redndahead Posted February 6, 2005 Share Posted February 6, 2005 Here is the situation. I have the attached script. A person enters in the form and submits the information. Everything works except my grade combobox. Instead of it defaulting back to nothing like the other 4 boxes it just doubles up the nbr of items in the combo box. You really have to look at it to see so any help would be very much appreciated. red P.S. choose only 3rd grade.Student_Database.zip Link to comment Share on other sites More sharing options...
redndahead Posted February 6, 2005 Author Share Posted February 6, 2005 Alright I found out where I could fix it. Instead of this: $GradeData = '1|2|3|4|5' I needed this: $GradeData = '|1|2|3|4|5' Don't understand why. If someone could explain it to me I would really appreciate it. red Link to comment Share on other sites More sharing options...
phillip123adams Posted February 6, 2005 Share Posted February 6, 2005 Alright I found out where I could fix it. Instead of this:$GradeData = '1|2|3|4|5'I needed this:$GradeData = '|1|2|3|4|5'Don't understand why. If someone could explain it to me I would really appreciate it.red<{POST_SNAPBACK}>I don't know why either, but I have discovered two things: 1. If where the data is first set contains the "" default, the grade levels do not duplicate (even without the leading pipe). 2. Since the grade levels do not change, the data does not have to be set again in each loop. Therefore, the GUICtrlSetData for the grade levels, in the loop, can be eliminated. Phillip Link to comment Share on other sites More sharing options...
Lazycat Posted February 6, 2005 Share Posted February 6, 2005 Don't understand why. If someone could explain it to me I would really appreciate it.<{POST_SNAPBACK}>Citate from help:If the "data" starts with | or is an empty string "" the previous list is destroyed.This behaviour was always here... Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
phillip123adams Posted February 6, 2005 Share Posted February 6, 2005 Citate from help:This behaviour was always here... <{POST_SNAPBACK}>Thanks Lazycat. But, why are the data duplicated when the first character is not an empty string or a pipe? It's acting as an "Add" function, which can be okay, but not described in the help file. Phillip Link to comment Share on other sites More sharing options...
Lazycat Posted February 6, 2005 Share Posted February 6, 2005 Thanks Lazycat. But, why are the data duplicated when the first character is not an empty string or a pipe? It's acting as an "Add" function, which can be okay, but not described in the help file.<{POST_SNAPBACK}>Hmm, maybe this a small docs flaw... This is by design: if here not pipe at first place, data will be added to old content of combobox (or listbox). You are right, this some sort of "Add". I'm not remember exactly, why this was made so... maybe JP can explain. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
redndahead Posted February 6, 2005 Author Share Posted February 6, 2005 THanks missed that in the help file. red 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