Jump to content

List box


SlimShady
 Share

Recommended Posts

The "no sort" style makes the scrollbar disappear.

How can I have both?

Here's a script you can test with...

Opt("GUICoordMode", 1)
Opt("GUINotifyMode", 1)
GuiCreate("Test", 250, 365, -1, -1)

$No_Sort = 0x1000
$list_1 = GUISetControl("list", "List 1", 20, 20, 200, 350, $No_Sort)
$list = ""
For $i = 1 To 50
    $list = $list & "Item " & $i & "|"
Next

$list = StringTrimRight($list, 1)
GUISetControlData(-1, $list)

GuiShow()

While 1
    Sleep(100)
    $msg = GuiMsg()
    If $msg = -3 Then ExitLoop
WEnd
GUIDelete()
Exit
Edited by SlimShady
Link to comment
Share on other sites

  • Developers

The "no sort" style makes the scrollbar disappear.

How can I have both?

Here's a script you can test with...

Opt("GUICoordMode", 1)
Opt("GUINotifyMode", 1)
GuiCreate("Test", 250, 365, -1, -1)

$No_Sort = 0x1000
$list_1 = GUISetControl("list", "List 1", 20, 20, 200, 350, $No_Sort)
$list = ""
For $i = 1 To 50
    $list = $list & "Item " & $i & "|"
Next

$list = StringTrimRight($list, 1)
GUISetControlData(-1, $list)

GuiShow()

While 1
    Sleep(100)
    $msg = GuiMsg()
    If $msg = -3 Then ExitLoop
WEnd
GUIDelete()
Exit

<{POST_SNAPBACK}>

just add the $WS_VSCOLL from the GUIConstants.au3 to it :

$list_1 = GUISetControl("list", "List 1", 20, 20, 200, 350, $No_Sort + $WS_VSCROLL )
Edited by JdeB

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

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...