C10: Double-click on a window string

Please help with a newbie question

I have a window with the following control


strBrowseBase is a string variable that contains the path of a set of files.
I would like to be able to double-click on this string and open the folder

Are there any clever tricks to do this, or do I just have to use a button?
How do I set the caption of the button to the path it opens?


Thanks in advance

Hey @DonnEdwards !
I think the typical way is to put a region over the string and then get the events via the region control.

If you were to use a button then setting the text is like this:

?MyButton{PROP:Text} = ‘the path’

Another approach is to leave the string as is and then next to that have a button with either the ellipse icon or three dots [...] and clicking the button does your thing.

1 Like

or use a read-only ENTRY control (background colored btnface) instead of a STRING. You can handle alert keys in the entry control and it allows the user to select/copy the current data.

1 Like

Thanks. This worked great with a flat button.

1 Like