Jump to content
Sign in to follow this  
ezzetabi

Combo box list.

Recommended Posts

ezzetabi

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 :ph34r: ?

Share this post


Link to post
Share on other sites
jpm

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? :ph34r:

Share this post


Link to post
Share on other sites
ezzetabi

I think not, GUIMsg() return the combo box number also when the user browse the list. This is the problem...

Edited by ezzetabi

Share this post


Link to post
Share on other sites
SlimShady

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 by SlimShady

Share this post


Link to post
Share on other sites
jpm

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 :ph34r: Edited by jpm

Share this post


Link to post
Share on other sites
ezzetabi

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 by ezzetabi

Share this post


Link to post
Share on other sites
SlimShady

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 by SlimShady

Share this post


Link to post
Share on other sites
jpm

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? :ph34r:

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.