Jump to content
Sign in to follow this  
megahyperion

Combo Box Vertical Slider MIA *help*

Recommended Posts

megahyperion

I cant seem to get the vertical slider to work on my drop down combo box.

I really dont want it as long as it is, I would like it to be about halp the length with the ability to scroll the rest.

Here is some sample code.

#include <GUIConstants.au3>

Global $CBS_DROPDOWNLIST= 3
Global $ES_READONLY= 2048
Global $LBS_STANDARD= 10485763
$GUI_EVENT_CLOSE= -3

GUICreate("My GUI combo") 

$combo = GUICtrlCreateCombo("A:", 100, 100, 50, 120, BitOR($ES_READONLY, $CBS_DROPDOWNLIST, $LBS_STANDARD))
GUICtrlSetData(-1,"B:|C:|D:|E:|F:|G:|H:|I:|J:|K:|L:|M:|N:|O:|P:|Q:|R:|S:|T:|U:|V:|W:|X:|Y:|Z:","A") 


GuiSetState ()



$OK = GUICtrlCreateButton ("OK",  200, 200, 60, 25)

While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop


If $msg = $OK Then Msgbox(0,"NFO",GuiRead($combo))    


Wend

thanks in advance

Share this post


Link to post
Share on other sites
CyberSlug

For Windows 9x/Me/2000, Change the height of the combo box:

$combo = GUICtrlCreateCombo("A:", 100, 100, 50, 60, BitOR($ES_READONLY, $CBS_DROPDOWNLIST, $LBS_STANDARD))

However, Windows XP ignores the height setting.....


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites
Valik

I think XP (And all others?) respect CBS_NOINTEGRALHEIGHT...

Share this post


Link to post
Share on other sites
megahyperion

I think XP (And all others?) respect CBS_NOINTEGRALHEIGHT...

<{POST_SNAPBACK}>

Valik..... YOU ARE THA MAN.

XP did respect CBS_NOINTEGRALHEIGHT, I just added it in and it worked perfect.

thank you thank you thank you thank you thank you :)

Share this post


Link to post
Share on other sites
megahyperion

O one more question.

Is there anyway to deselect the combo box?

After I add in the $ES_READONLY it does become read only but it also stays selected even if you are using a different function in the gui.

This isnt a big problem but if you have a mouse with a scroll wheel and would like to scroll in a different function you cant because it will always effect the combo box.

any suggestions?

thanks again

Share this post


Link to post
Share on other sites
Jos

O one more question.

Is there anyway to deselect the combo box?

After I add in the $ES_READONLY it does become read only but it also stays selected even if you are using a different function in the gui.

This isnt a big problem but if you have a mouse with a scroll wheel and would like to scroll in a different function you cant because it will always effect the combo box.

any suggestions?

thanks again

<{POST_SNAPBACK}>

Do you want to change the focus to the Button ?

Thats done with: GUISetState($ok, $GUI_FOCUS)


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
megahyperion

Yes that works, thanks again :)

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  

×