muncherw Posted April 1, 2009 Share Posted April 1, 2009 (edited) Can you not use GUICtrlSetOnEvent with a tabItem so that when you click a different tab it does something? Or do i always have to use GUICtrlRead and then use a switch to execute code based on that? Edited April 1, 2009 by muncherw Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic] Link to comment Share on other sites More sharing options...
martin Posted April 1, 2009 Share Posted April 1, 2009 Can you not use GUICtrlSetOnEvent with a tabItem so that when you click a different tab it does something? Or do i always have to use GUICtrlRead and then use a switch to execute code based on that?I think you to use GUICtrlSetOnEvent for the tab control not the tab items. Then when a tab is clicked you can find out which one is current with GuiCtrlRead. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
muncherw Posted April 1, 2009 Author Share Posted April 1, 2009 (edited) I think you to use GUICtrlSetOnEvent for the tab control not the tab items. Then when a tab is clicked you can find out which one is current with GuiCtrlRead.Thanks for the hint, Martin. I figured out what my problem was- I did not start my new set of data with a delimiter so it was appending it rather than replacing it and I didn't notice. Once I did that every thing started working as intended. However one other problem arose, when I set the new data it floods in properly but the initial dropdown field is empty and I'd like to populate that. Any ideas on what function can help me set that? Using the optional default parameter with GUICtrlSetData may set the value but it doesn't display it.Edited for typos. Edited April 1, 2009 by muncherw Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic] Link to comment Share on other sites More sharing options...
martin Posted April 1, 2009 Share Posted April 1, 2009 (edited) Thanks for the hint, Martin. I figured out what my problem was- I did not start my new set of data with a delimiter so it was appending it rather than replacing it and I didn't notice. Once I did that every thing started working as intended. However one other problem arose, when I set the new data it floods in but the initial dropdown field is empty is empty and I'd like to populate that. Any ideas on what function can help me set that? Using the optional default parameter with GUICtrlSetData may set the value but it doesn't display it.Without your code I can't say, but the GuiCtrlCreateCombo example in the help sets a default value. Edited April 1, 2009 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
muncherw Posted April 1, 2009 Author Share Posted April 1, 2009 Without your code I can't say, but the GuiCtrlCreateCombo example in the help sets a default value.CODEGlobal $adminSwitchList = "ADM1S-101|ADM1S-102|ADM1S-103|ADM2S-104|ADM2S-105|ADM2S-106|ADM2S-107|ADM2S-108|ADM2S-109|ADM3S-110|ADM3S-111|ADM3S-112|ADM3S-113|ADM3S-114|ADM3S-115|ADM4S-116|ADM4S-117|ADM4S-118|ADM4S-119|ADM4S-120|ADM5S-121|ADM5S-122|ADM5S-123|ADM5S-124|ADM5S-125"$ADM1S = GUICtrlCreateCombo("ADM1S-100", 26, 83, 207, 25)GUICtrlSetData(-1, $adminSwitchList);This works as expected;Then later I want to reset the data. This is where the data changes but the default text isn't put in the box.GUICtrlSetData($ADM1S, "|" & $adminSwitchList, "ADM1S-100") Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic] Link to comment Share on other sites More sharing options...
Authenticity Posted April 1, 2009 Share Posted April 1, 2009 Setting the default from the current list. If "ADM1S-100" is not present in the combo then it defaults to "". Link to comment Share on other sites More sharing options...
muncherw Posted April 1, 2009 Author Share Posted April 1, 2009 Setting the default from the current list. If "ADM1S-100" is not present in the combo then it defaults to "".Aaaaaah. Let me just try that. Perfect. Just what I was looking for. Thank you, Authenticity. Thank you too, Martin. Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now