4 posts in this topic
I'm working on a little project, and I was wondering if there's a way ( sure there is ) to insert data to a ComboBox control everytime the user insert some text in the ComboBox which is not in the ComboBox data. I'll try to explain with an example:
- Form with some data ( ComboBox is empty );
- User prompt something in the ComboBox: if what the user prompts is not in the ComboBox values ( at the moment empty ), then insert the value in the ComboBox values, in order to have, next time the user prompts the form, the value that he entered.
More pratical example:
- First call of the form, ComboBox empty;
- I prompt "A" in the ComboBox;
- Second call, in the ComboBox I should see "A";
- I prompt "B" in the ComboBox;
- Third call, I should see "A"
- And so on...
Everytime the form is called, I re-create it, so I think I can't use _GUICtrlComboBox_AddStrings().
I tried with
Global $strCboStrings = "" ; When the user prompt the form, the code below is executed. ; I.E. : User prompt "A", after the if I should have "A"; ; In the second call, If I write "B", I should see "A" ; "B"; ; If I write "A" again, in the combobox values should not be any changes. If Not StringInStr($strCboStrings, GUICtrlRead($cboVoiceCategory)) <> 0 Then $strCboStrings &= $strCboStrings & "|" & GUICtrlRead($cboVoiceCategory) EndIf Any suggestion?
Good evening guys
I am working on a little project, in which I have to retrieve 8000+ rows of data from a table, from a SQLite database, to populate a combobox
This is what I tried 'til now, but it still takes about 12 seconds to populate the combobox.
_SQLite_Exec($objDatabase, "BEGIN TRANSACTION;") If _SQLite_GetTable($objDatabase, "SELECT DISTINCT Comune FROM LISTA_COMUNI;", $arrRisultatoQuery, $intRighe, $intColonne) = $SQLITE_OK Then For $i = 2 To UBound($arrRisultatoQuery) - 1 If $i < UBound($arrRisultatoQuery) - 1 Then GUICtrlSetData($cbo_ComuneNascita, $arrRisultatoQuery[$i] & "|") Else GUICtrlSetData($cbo_ComuneNascita, $arrRisultatoQuery[$i]) EndIf Next _SQLite_Exec($objDatabase, "COMMIT;") Are there any other solution to retrieve 8000+ records from a SQLite database?
Thank you very much
Hi huys !
how are you ? family ? dog, cat ? well..
I've got a problem: _GUICtrlComboBox_GetCueBanner
i can't get it to work.
Simple: even the example from help does'nt work...
I insist, it's excactly the example from the help, no modifications
#include <GuiComboBox.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $g_idMemo Example() Func Example() Local $idCombo ; Create GUI GUICreate("ComboBox Get Count", 400, 296) $idCombo = GUICtrlCreateCombo("", 2, 2, 396, 296) _GUICtrlComboBox_SetCueBanner($idCombo, "Select an Item") $g_idMemo = GUICtrlCreateEdit("", 10, 50, 376, 234, $WS_VSCROLL) GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New") GUISetState(@SW_SHOW) ; Add files _GUICtrlComboBox_BeginUpdate($idCombo) _GUICtrlComboBox_AddDir($idCombo, @WindowsDir & "\*.exe") _GUICtrlComboBox_EndUpdate($idCombo) MemoWrite("Cue Banner: " & _GUICtrlComboBox_GetCueBanner($idCombo)) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example ; Write a line to the memo control Func MemoWrite($sMessage) GUICtrlSetData($g_idMemo, $sMessage & @CRLF, 1) EndFunc ;==>MemoWrite I also added the display of the cuebanner in the loop.
It never display what actually appears in the combo
If you can show me any king of working example.
Thanks Guys !
Actually autoit v188.8.131.52
I have searched everywhere but on the forum there isn't an example of a combobox with checkbox. I think is a very useful control but require subclassing. Several example in C++, one of this:
If somone has some time to check it out. If need i can provide the source code. Thanks
Let's say I have 10 combobox and 10 items in each.
1- If one item in a combobox is selected, I don't want it to be selectable in another combobox. (Or if it is, remove the duplicate one)
2- When I click on button, I want 10 msgboxes to show, and each item showing in each msgbox in order they are selected. (from combobox1 to combobox10)
I'm confused whether to use select or switch or other loops.