Tuesday, June 13, 2017

DefaultDblClick in Dexterity

Took me a while to figure this one out, being the Dex genius I am.  Also there is almost nothing searchable about this so here goes.

If you have a scrolling region in your custom window in Dexterity and you want to double click on a row and have your app do something here is what you do.

Set the DefaultDblClick property of the scrolling window to True.  This is done from the Object properties tab of the open scrolling window.  According to the docs I've seen the scrolling window needs to be WindowType=BrowseOnly.

On the main form you need a button to take action based on the double click.  This button needs to have the property Default=True.  To be safe I set Hyperspace=True also.

The action button I want clicked is not located visibly on my form (Visible=False).  The following script is run as the Change property of this button:

open form <my form>;

<field> of window <my window> of form <my form> = <field> of window <scroll window>;
{repeat above for all fields needed in the opening form}

run script 'Display Existing Record' of window <my window> of form <my form>;

That did it for me.  Hope it works for you!

No comments:

Post a Comment