Which browse/column clicked on

BrianSmith

New Member
Is it possible to have a non-updateable browser displaying several columns from a table and have the user double click on a particular cell and know what the fieldname of the cell is that they clicked on?
Brian
 

joey.jeremiah

ProgressTalk Moderator
Staff member
One workable solution would be overlaying objects ( widgets ) on browse cells.

Then you would have a "full" widget to work with. Besides giving you more options, like images, combos etc.

You can find a complete example in the "Programming Handbook" doc, "Overlaying objects on browse cells" 12–39. HTH
 

nborshukov

New Member
on MOUSE-SELECT-DBLCLICK trigger of browse widget use the next code to obtain the field name for the column:

DEF VAR c-h AS WIDGET-HANDLE NO-UNDO.
DEF VAR X AS INT NO-UNDO.
X = LAST-EVENT:X.
c-h = BROWSE {&self-name}:FIRST-COLUMN.
DO WHILE VALID-HANDLE(c-h) :
IF X GE c-h:X AND X LE c-h:X + c-h:WIDTH-PIXELS THEN
MESSAGE c-h:buffer-field:NAME VIEW-AS ALERT-BOX.
c-h = c-h:NEXT-COLUMN.
END.
 
Top