ezzetabi Posted September 6, 2004 Share Posted September 6, 2004 I'd like have the chance of making a list of options in a combo box just before the user opens it checking what he wrote. It should be be hard GUIMsg() or GUIMsg(0) checking when the user open the box, but GUIMsg() return the same number even when the user just pass the cursor on the various options of the list! So making just a If GUIMsg() = $combox CREATE LIST EndIf Can not work since the list will be remade (and closed overall) every time a user browse the existing items. Also even check the 'first time' GUIMsg() is equal to $combo box can't work since there is no way (AFAIK) to detect when the user close the list. Any solution to this my small big problem ? Link to comment Share on other sites More sharing options...
jpm Posted September 6, 2004 Share Posted September 6, 2004 If for any reason the combolist has to change the change must be made when you get the msg on the corresponding control. So when the use click on the combo contril the list is already OK. Does that make sense to you? Link to comment Share on other sites More sharing options...
ezzetabi Posted September 6, 2004 Author Share Posted September 6, 2004 (edited) I think not, GUIMsg() return the combo box number also when the user browse the list. This is the problem... Edited September 6, 2004 by ezzetabi Link to comment Share on other sites More sharing options...
SlimShady Posted September 6, 2004 Share Posted September 6, 2004 (edited) jpm is right.The user opens the combobox (to select something)...What is it that you want to do, then?Edit 1:Wait...I'd like have the chance of making a list of options in a combo box just before the user opens it checking what he wrote.So you want to know when a user enter something in the combobox?I understand what you mean.I think it's impossible to receive a message for that through GUIMsg() (with or without the 0)The only way is to use GUIRead() and compare it to the existing values. Edited September 6, 2004 by SlimShady Link to comment Share on other sites More sharing options...
jpm Posted September 6, 2004 Share Posted September 6, 2004 (edited) So I have to use GUIMsg(), and I can't use GUIMsg(0)? I need my Adlib func and other things working... <{POST_SNAPBACK}>You need to use GUIMsg(0) to be able to have adlib working Edited September 6, 2004 by jpm Link to comment Share on other sites More sharing options...
ezzetabi Posted September 6, 2004 Author Share Posted September 6, 2004 (edited) Thats the point... GUIMsg(0) returns the combobox number even when the user only browse the list! Not only when the use open the list. Edited September 6, 2004 by ezzetabi Link to comment Share on other sites More sharing options...
SlimShady Posted September 6, 2004 Share Posted September 6, 2004 (edited) Thats the point... GUIMsg(0) returns the combobox number even when the user only browse the list! Not only and if using ALT+Down dont when the use open the list. <{POST_SNAPBACK}>The only way is to use GUIRead() and compare it to the existing values.Or use this scrap.Global $prevItem $CurItem = GUIRead($combobox_1) If $prevItem <> $CurItem Then $prevItem = $CurItem ;Do your stuff here Else ;User didn't select/enter something else EndIf Edited September 6, 2004 by SlimShady Link to comment Share on other sites More sharing options...
jpm Posted September 6, 2004 Share Posted September 6, 2004 Thats the point... GUIMsg(0) returns the combobox number even when the user only browse the list! Not only when the use open the list. <{POST_SNAPBACK}>You need when receiving the msg from GUIMsg(0) just to GUIread ($combo) While $msg= GUIMsg(0) Select case $msg=$comboId $combovalue= GUIRead($msg) ... Endselect Does that make sense? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now