Jump to content

Disable combobox selection frame


Go to solution Solved by WildByDesign,

Recommended Posts

Posted

Hello everyone, I'm trying to remove (deactivate) the frame that is on the combobox button, I can even start the GUI without it but when selecting a value in the control it reappears as in the image where the arrow points, how can I completely remove this box?

#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <ComboConstants.au3>


Local $hGUI = GUICreate("COMBOBOX", 500, 500)
GUISetBkColor(0xE9E6DF)


Local $idComboBox = GUICtrlCreateCombo("Item 1", 100, 200, 260, 20, $CBS_DROPDOWNLIST)
GUICtrlSetFont(-1, 18, 700, 0, "Segoe UI", 4)
GUICtrlSetData($idComboBox, "COMBOBOX|COMBOBOX1|COMBOBOX2|COMBOBOX3", "COMBOBOX")


GUISetState(@SW_SHOW)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            ExitLoop
    EndSwitch
WEnd

GUIDelete($hGUI)

 

combobox.JPG

Posted
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <ComboConstants.au3> 

Local $hGUI = GUICreate("COMBOBOX", 500, 500)
GUISetBkColor(0xE9E6DF)
Local $idBttnFocus = GUICtrlCreateButton("=P", -20, -20, 5, 5) ; my trick
Local $idComboBox = GUICtrlCreateCombo("Item 1", 100, 200, 260, 20, $CBS_DROPDOWNLIST)
GUICtrlSetFont(-1, 18, 700, 0, "Segoe UI", 4)
GUICtrlSetData($idComboBox, "COMBOBOX|COMBOBOX1|COMBOBOX2|COMBOBOX3", "COMBOBOX")

; WildByDesign
;~ Global Const $WM_CHANGEUISTATE = 0x0127
;~ GUICtrlSendMsg($idComboBox, $WM_CHANGEUISTATE, 65537, 0)

GUISetState(@SW_SHOW)
While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            ExitLoop
    EndSwitch
WEnd
GUIDelete($hGUI)

..am a bit late but, this is what I use.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

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
  • Recently Browsing   0 members

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