Jump to content

can anybody tell me about combo boxes?


damian666
 Share

Recommended Posts

i have made a script to change wallpapers, and it works like a charm on XP.

but when i trie it on 2000, my combo box doesnt see any folders , which i got it to search for..

but on XP, it works great???

any ideas?

;Read ini file
    $Standard = IniRead("Wallchanger.ini", "Maps", "Current", "")

;Create combo and set to current map
    $Combo1 = GUICtrlCreateCombo("", 213, 323, 160, 25)
    GUICtrlSetData(-1, $Standard)
    GUICtrlSetOnEvent(-1, "combo1Click")
    $Label3 = GUICtrlCreateLabel("Select a Wallpaper pack", 216, 352, 150, 17)
;Create combo and set to current map end
    
; Shows the filenames of all files in the current directory
    $search = FileFindFirstFile(@ScriptDir & "\Wallpaper\*.*")

; Check if the search was successful
    If $search = -1 Then
        GUICtrlSetData($Label3, "No wallpaper packs found")
        GUICtrlSetState($Combo1, $GUI_DISABLE)
    EndIf

;find map names if any...
    While 1
        $file = FileFindNextFile($search)
        If @error Then ExitLoop
        GUICtrlSetData($Combo1, $file)
    WEnd

; Close the search handle
    FileClose($search)

Any help is appriciated damian666

and proud of it!!!
Link to comment
Share on other sites

It probably does find them, but your combo doesn't drop down right?

in XP the sixe of a combo box is dynamic but on 2K it isn't

Change this line $Combo1 = GUICtrlCreateCombo("", 213, 323, 160, 25) to $Combo1 = GUICtrlCreateCombo("", 213, 323, 160, 120) and see how you go. I changed the 25 drop down size to 120

Link to comment
Share on other sites

Cool, thanx for the fast reply man.

I didnt knew that, will try that,

thanx a lot, anymore controls that have that limitation?

damian666

Ps, wont this make my combobox on XP to big?

Try it, you may want to adjust the 120 figure for 2K

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...