so i ran into a Problem i didn't expect to get stuck on.
It sounds simple (and probably is) but i can't seem to get it to work
So i created a Combobox and filled it with some things from an array which worked fine.
$combobox = GUICtrlCreateCombo($list, 160, 200, 265, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GuiCtrlSetData($list, "|" & _ArrayToString($list,Default,1),$list) GUICtrlSetFont(-1, 9, 400, 0, "Arial") Now i want to change the style of the combobox from $CBS_DROPDOWN to $CBS_DROPDOWNLIST via a checkbox.
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 160, 96, 105, 25) Case $Checkbox1 If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then Call ("Read_only") Else Call ("Edit") Endif Func Read_only() GUICtrlSetStyle ($Combobox1,something to change it to $CBS_DROPDOWNLIST) EndFunc Func Edit() GUICtrlSetStyle ($Combobox1,something to change it to $CBS_DROPDOW) EndFunc I tried using $CBS_DROPDOWN and $CBS_DROPDOWNLIST but it simply does nothing.
I also tried $ES_READONLY which kinda worked, it changed the combobox so i couldn't change the input via dropdown anymore but i could still type in it via keyboard (which i dont want).
It's essential that its Editable but once the checkbox is checked the combobox becomes readonly so you can't type in it anymore but you can still choose between the items in the list. (It does not have to save your current input if you write something in it and then check the Checkbox it would be best if it would simpy jump back to the first item in the list)
Im sure this is a simple thing but after long google search im tired of my stupidity can someone give me a push in the right direction?
I possibly misunderstood the value of combo boxes, but I thought you could type a value, press enter and the combo box would store that value.
The reason for wanting this is to store a history of typed commands into the combo box (accepted by pressing enter).
After hours of trying to trap enter on a combobox I realized that the enter event was not registering.
I had code like this (which used to work on a input box), but it does not for a combobox (because it does not accept enter)
unc WM_COMMAND($hWnd, $Msg, $wParam, $lParam) Local $nNotifyCode = BitShift($wParam, 16) Local $nID = BitAND($wParam, 0x0000FFFF) If $hWnd = $CmdForm Then If $nID = $ComboInput Then ; useed to work on a normal input box If _IsPressed('0D') Then ; enter was pressed, respond DoCmd() Anyone able to help?
We've been able to drag images out of web browsers since forever. Can I drag one into my GUI?
Or rather, can I drag an image from my web browser onto my GUI and have my app *do* something with that image?
My fingers bleed from searching. Any ideas much appreciated!