is8591 Posted August 9, 2005 Share Posted August 9, 2005 I was trying to set-up a combo where user can only select from list items but when use $CBS_DROPDOWNLIST I loose the scrolldown bar so user can only pick from visible part of LIST. User can still use arrow UP and Down to see the other parts of LIST but would be nice to have a scroll bar. Anyone has any ideas? Thank you. Link to comment Share on other sites More sharing options...
Helge Posted August 9, 2005 Share Posted August 9, 2005 This should be mentioned in the helpfile.http://www.autoitscript.com/forum/index.ph...topic=13796&hl= Link to comment Share on other sites More sharing options...
is8591 Posted August 9, 2005 Author Share Posted August 9, 2005 Does this mean that it's impossible to have a read-only combo with a scrollable list? Link to comment Share on other sites More sharing options...
Helge Posted August 9, 2005 Share Posted August 9, 2005 Seems like you have a problem with scrolling, and I'm not talking about the combo.Set the height of the combobox to be around 100px.<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
is8591 Posted August 9, 2005 Author Share Posted August 9, 2005 Here is the test code. Is there any mistakes?#include <GuiConstants.au3>GuiCreate("Test Read-Only Combo", 200, 200,(@DesktopWidth-200)/2, (@DesktopHeight-200)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)$Combo = GuiCtrlCreateCombo("Select Item", 20, 20, 160, 200, $CBS_DROPDOWNLIST )$s_Combo = ""For $i = 1 To 20 $s_Combo = $s_combo & "Item" & $i & "|"NextGUICtrlSetData($Combo, $s_Combo) GuiSetState()While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelectWEnd Link to comment Share on other sites More sharing options...
HardCopy Posted August 10, 2005 Share Posted August 10, 2005 Here is the test code. Is there any mistakes?<{POST_SNAPBACK}>#include <GuiConstants.au3> GuiCreate("Test Read-Only Combo", 200, 200,(@DesktopWidth-200)/2, (@DesktopHeight-200)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Combo = GuiCtrlCreateCombo("Select Item", 20, 20, 160, 50, $CBS_DROPDOWNLIST + $WS_VSCROLL ) $s_Combo = "" For $i = 1 To 120 $s_Combo = $s_combo & "Item" & $i & "|" Next GUICtrlSetData($Combo, $s_Combo) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEndIs this what u want?HardCopy Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad Link to comment Share on other sites More sharing options...
is8591 Posted August 10, 2005 Author Share Posted August 10, 2005 Thanks a lot - it does the trick. I just did not realized that window styles can be used with GUI controls. Link to comment Share on other sites More sharing options...
Josbe Posted August 10, 2005 Share Posted August 10, 2005 Thanks a lot - it does the trick. I just did not realized that window styles can be used with GUI controls.<{POST_SNAPBACK}>Like an addition...it's more appropriate to use the styles in this way:BitOr( $CBS_DROPDOWNLIST, $WS_VSCROLL)instead of$CBS_DROPDOWNLIST + $WS_VSCROLL AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now