Jump to content
Sign in to follow this  
SlimShady

List box

Recommended Posts

SlimShady

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

Share this post


Link to post
Share on other sites
Jos

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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

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  

×