Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Changing control text at runtime (http://forums.winamp.com/showthread.php?t=210372)

Newbe 14th March 2005 12:09

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 14:37

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 17:43

Quote:

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 22:42

notify works with DirRequest

deguix 14th March 2005 23:19

Quote:

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:

Quote:

Used by "Button", "Link", "CheckBox", "RadioButton", "ListBox" and "DropList" controls.

Newbe 15th March 2005 11:04

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 16:12

Quote:

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.


All times are GMT. The time now is 05:06.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.