Newbe
14th March 2005 13:09 UTC
Changing control text at runtime
Hi,
I have a dialog with three directory fields. If the user changes the first directory I want to be able to update the remaining two automatically (the user can override the next two manually).
Can this be done?
cheers,
Phani
Anders
14th March 2005 15:37 UTC
Add the notify flag (in the .ini) to the first dir field, in the leave function for the page, check if the dir field changed, if it did, use sendmessage with ${WM_SETTEXT} on the other fields
All is explained in the InstallOptions readme
deguix
14th March 2005 18:43 UTC
Add the notify flag (in the .ini) to the first dir field, in the leave function for the page, check if the dir field changed, if it did, use sendmessage with ${WM_SETTEXT} on the other fields
I don't think the
NOTIFY flag works for
DirRequest controls. I gonna check out this at home. But if my statement is true (which probably is), you can only change it automatically by using InstallOptionsEx.
Anders
14th March 2005 23:42 UTC
notify works with DirRequest
deguix
15th March 2005 00:19 UTC
notify works with DirRequest
Bah, he is right, but only when the user clicks the button. It doesn't update the other controls when the user only changes the
Text control part of the
DirRequest control.
EDIT: The documentation doesn't mention that NOTIFY flag works for
DirRequest,
FileRequest, and
ComboBox controls:
Used by "Button", "Link", "CheckBox", "RadioButton", "ListBox" and "DropList" controls.
Newbe
15th March 2005 12:04 UTC
Tried using NOTIFY, and it only works if I use the button at the end of the DirRequest control. If I manually change the text in the textbox I don't get a notification message.
Am I doing something wrong?
/Phani
Anders
15th March 2005 17:12 UTC
Originally posted by Newbe
Am I doing something wrong?
no
You probably need to create a plugin and subclass if you want it to respond to changes in the text field.