Posts: 24
Threads: 9
Joined: Feb 2014
I've been trying to figure this out for awhile and I must be missing something. I've been searching this forum for anything that may help, but not finding anything. Here's what I'd like to do... I created a dialog that contains text input fields that I populated with information. In this dialog other than the "SAVE/CANCEL" buttons that do their job, I've added a couple of other buttons like CLEAR, RECALCULATE or RANDOMIZE to change the text input fields, (eg: if I hit CLEAR, all the text fields would be emptied... if I hit RANDOM, it would populate all the fields with random data, etc) but I cannot seem to figure out how to trigger those extra buttons to do that. Any help would be appreciated!
Posts: 12,071
Threads: 140
Joined: Dec 2002
In Dialog Editor click the button and click Events in toolbar.
Posts: 24
Threads: 9
Joined: Feb 2014
Thanks G... Don't know how I missed that!
Posts: 24
Threads: 9
Joined: Feb 2014
Well at least they are clickable now but only within the subroutine within the function... I've tried returning different values but they are only triggered if the dialog is closed with OK or CANCEL. I tried making the values I wanted to change global, but that doesn't work either. I don't want to close the dialog, just change the contents of some of the dialog values when the button is pressed. Make sense?
Posts: 12,071
Threads: 140
Joined: Dec 2002
10-12-2024, 07:45 AM
(This post was last modified: 10-12-2024, 07:47 AM by Gintaras.)
To get or set dialog control values without closing the dialog, can be used functions like DT_GetControl, DT_GetControls, DT_SetControl, DT_SetControls. More info in QM Help topic "Dialog editor".
Posts: 24
Threads: 9
Joined: Feb 2014
Yep... that's the ticket... thanks again G... Truly appreciate it!