Question Dynamic Browse with no-box

NeilM

New Member
Progress 10.1

I am currently using a dynamic browse :-

Yet can't seem to switch the box off on the browse.

CREATE BROWSE browse-hdl
ASSIGN TITLE = "Dynamic Browse"
FRAME = FRAME MyFrame:HANDLE
QUERY = QUERY q1:HANDLE
X = 2
Y = 2
WIDTH = 74

DOWN = 10.

Now I may have missed the relevant attribute, or there maybe an obtuse way to achieve the same thing. Any advice would be appreciated. I could fall back to a :-

DEFINE BROWSE ...... QUERY ....
DISPLAY .....
WITH NO-BOX.


But I really would prefer the dynamic browse but without the box :)
 

TomBascom

Curmudgeon
I haven't tried to research this very hard but... sometimes you can start with a static thing and still dynamically change the bits that you really want to be dynamic. So depending on how dynamic you need your "dynamic browse" to be a hybrid approach *might* work.

Personally I'm about ready to punt on browse widgets and just create a class to wrap around a good old down frame and a query.
 

NeilM

New Member
I had a feeling that it wasn't possible, but I was hoping there was a small chance. I had a look in 11.3 reference guide and couldn't see any changes that related to it either.

Thanks to you both for taking the time to reply.
 

Osborne

Active Member
Good points raised by Tom, and depending on how dynamic your needs are you could define a static browse with the NO-BOX setting and then dynamically add the query, table and fields later:
Code:
DEFINE VARIABLE hBrowse AS HANDLE NO-UNDO.
DEFINE VARIABLE hBuffer AS HANDLE NO-UNDO.
DEFINE VARIABLE hQuery AS HANDLE NO-UNDO.

DEFINE BROWSE b1 WITH NO-BOX NO-ROW-MARKERS SEPARATORS SIZE 56 BY 9.

DEFINE FRAME f1
   b1 AT ROW 6 COL 12
      WITH THREE-D SIZE 80 BY 20.

hBrowse = b1:HANDLE.

CREATE QUERY hQuery.
CREATE BUFFER hBuffer FOR TABLE "Customer".
hQuery:SET-BUFFERS(hBuffer).
hQuery:QUERY-PREPARE("for each Customer no-lock").
hBrowse:QUERY = hQuery.
hBrowse:ADD-LIKE-COLUMN("Customer.CustNum").
hBrowse:ADD-LIKE-COLUMN("Customer.Name").
hBrowse:ADD-LIKE-COLUMN("Customer.CreditLimit").
hQuery:QUERY-OPEN().

VIEW FRAME f1.
ENABLE b1 WITH FRAME f1.
WAIT-FOR GO, END-ERROR OF FRAME f1.

hQuery:QUERY-CLOSE().
DELETE OBJECT hBuffer.
DELETE OBJECT hQuery.
 

Stefan

Well-Known Member
With .Net controls, which were introduced in 10.2 in 2009 (you're on 10.1) - and which would require a bit more reworking than moving static widgets to dynamic widgets - you can:

Code:
      THIS-OBJECT:dataGridView1:BorderStyle = System.Windows.Forms.BorderStyle:None.
 
Top