Opened 17 years ago
Closed 17 years ago
#102 closed Bug (Fixed)
ControlCommand(SelectString) - wrong selection order again
Reported by: | Zedna | Owned by: | Jpm |
---|---|---|---|
Milestone: | 3.2.11.1 | Component: | AutoIt |
Version: | 3.2.10.0 | Severity: | |
Keywords: | Cc: |
Description
When there is value ABC|ABC_DEF in ComboBox then
ControlCommand($gui,,$h_combo1,'SelectString','ABC') --> problem: selects ABC_DEF and not ABC
As workaround I used:
_GUICtrlComboBox_SelectString($h_combo2, 'ABC') --> OK: selects ABC
Note:
Here is link to very similar BUG which was fixed already - http://www.autoitscript.com/forum/index.php?showtopic=54738
That older bug is fixed but now in 3.2.10 version doesn't work this new testing example:
both comboboxes are the same
on the first one is applied ControlCommand(SelectString)
on the first one is applied _GUICtrlComboBox_SelectString() as workaround
#include <GUIConstants.au3> #Include <GuiComboBox.au3> $gui = GUICreate("SelectString test", 212, 212) $combo1 = GUICtrlCreateCombo('',10, 20, 100, 100) GUICtrlSetData($combo1, '|ABC|ABC_DEF', 'ABC_DEF') GUICtrlCreateLabel('Problem',130, 20, 100) $combo2 = GUICtrlCreateCombo('ABC|ABC_DEF',10, 70, 100, 100) GUICtrlSetData($combo2, '|ABC|ABC_DEF', 'ABC_DEF') GUICtrlCreateLabel('OK',130, 70, 100) GUISetState(@SW_SHOW) $h_combo1 = ControlGetHandle($gui, "", $combo1) $h_combo2 = ControlGetHandle($gui, "", $combo2) ; TEST: should select first row in ComboBox ControlCommand($gui,'',$h_combo1,'SelectString','ABC') ; problem: selects ABC_DEF _GUICtrlComboBox_SelectString($h_combo2, 'ABC') ; OK: selects ABC While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd
OS: WINXP SP2 CZ
Attachments (0)
Change History (3)
comment:1 Changed 17 years ago by Zedna
comment:2 Changed 17 years ago by Jpm
- Milestone set to 3.2.11.1
- Owner set to Jpm
- Status changed from new to accepted
comment:3 Changed 17 years ago by Jpm
- Resolution set to fixed
- Status changed from accepted to closed
Fixed in version: 3.2.11.1
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
correction in description:
both comboboxes are the same
on the first one is applied ControlCommand(SelectString)
on the second one is applied _GUICtrlComboBox_SelectString() as workaround