Sign in to follow this  
Followers 0
Jackchar

How to Change The ComboBox Style?

6 posts in this topic

#1 ·  Posted (edited)

The ComboBox Cann't Input By Creat ("use $GUI_SS_DEFAULT_COMBO"),How to Change The style And Can Be Input Text ?

GUICtrlSetStyle($Combo1,$GUI_SS_DEFAULT_COMBO)Still cann't Input,What Can Be Do it ?

#include <ButtonConstants.au3>

#include <ComboConstants.au3>

#include <GUIConstantsEx.au3>

#include <StaticConstants.au3>

#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("Form1", 253, 193, 192, 124)

$Combo1 = GUICtrlCreateCombo("11", 48, 24, 137, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))

GUICtrlSetData(-1,"22|33")

$Button1 = GUICtrlCreateButton("Change ComboBox State", 64, 128, 105, 25, 0)

$Label1 = GUICtrlCreateLabel("The ComboBox Cann't Input By Creat ,How to Change The State And Can Be Input Text ?", 56, 56, 133, 49)

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $Button1

GUICtrlSetStyle($Combo1,$GUI_SS_DEFAULT_COMBO)

EndSwitch

WEnd

Edited by Jackchar

Share this post


Link to post
Share on other sites



The ComboBox Cann't Input By Creat ,How to Change The State And Can Be Input Text ?

See the state and style tables. $CBS_DROPDOWN is not a state, it's a style. Are you trying to add an item to the combo box or change its state or change its style?

GUIStrlSetState() is much different from GUICtrlSetStyle()


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

See the state and style tables. $CBS_DROPDOWN is not a state, it's a style. Are you trying to add an item to the combo box or change its state or change its style?

GUIStrlSetState() is much different from GUICtrlSetStyle()

Yes , How To use GUICtrlSetStyle() And Make the Combobox to deflult Style ?

Make sure the combo edit box can input text .

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

The default allows you to enter text and since you don't have a style set then it will be using default. I think what you are trying to do is add typed text into the control. In that case use GUICtrlSetData($Combo1, GUICtrlRead($Combo1))

If You actually do want to change styles then See the Comb table in the styles reference and make sure you use

#include <ComboConstants.au3>

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

The default allows you to enter text and since you don't have a style set then it will be using default. I think what you are trying to do is add typed text into the control. In that case use GUICtrlSetData($Combo1, GUICtrlRead($Combo1))

If You actually do want to change styles then See the Comb table in the styles reference and make sure you use

#include <ComboConstants.au3>

yeah, I use

GUICtrlSetStyle($Combo1,$GUI_SS_DEFAULT_COMBO)

But It Cann't change the combobox style to default 。

Share this post


Link to post
Share on other sites

noboby help?

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  
Followers 0