Another Listbox question
Posted
#1
(In Topic #1434)
Regular

Code (gambas)
- 'nothing more to advance
- ValueBox1.Value = 0
- TextBox2.Text = ListBox1.Current.Text
- ValueBox2.Value = lb1count.Value
- TextBox2.Text = ListBox1.Current.Text
- Wait 0.1
- TextBox2.Text = ListBox1.Current.Text
- ValueBox2.Value = lb1count.Value - ValueBox1.Value
- fiveahead_Click
- pos1.Text = listbox1.Current.Text
- pos2.Text = listbox1.Current.Text
- pos3.Text = listbox1.Current.Text
- pos4.Text = listbox1.Current.Text
- pos5.Text = listbox1.Current.Text
- 'go back to what was requested
- pos1.Text = listbox1.Current.Text
- pos2.Text = listbox1.Current.Text
- pos3.Text = listbox1.Current.Text
- pos4.Text = listbox1.Current.Text
- pos5.Text = listbox1.Current.Text
- 'go back to what was requested
- pos1.Text = listbox1.Current.Text
- pos2.Text = listbox1.Current.Text
- pos3.Text = listbox1.Current.Text
- pos4.Text = listbox1.Current.Text
- pos5.Text = listbox1.Current.Text
- 'go back to what was requested
- pos1.Text = listbox1.Current.Text
- pos2.Text = listbox1.Current.Text
- pos3.Text = listbox1.Current.Text
- pos4.Text = listbox1.Current.Text
- pos5.Text = listbox1.Current.Text
- 'go back to what was requested
- pos1.Text = listbox1.Current.Text
- pos2.Text = listbox1.Current.Text
- pos3.Text = listbox1.Current.Text
- pos4.Text = listbox1.Current.Text
- pos5.Text = listbox1.Current.Text
- 'go back to what was requested
- pos1.Text = listbox1.Current.Text
- pos2.Text = listbox1.Current.Text
- pos3.Text = listbox1.Current.Text
- pos4.Text = listbox1.Current.Text
- pos5.Text = listbox1.Current.Text
- 'go back to what was requested
Here's the Back button:
Code (gambas)
- 'nothing more to advance
- ValueBox1.Value = lb1count.Value - 1
- TextBox2.Text = ListBox1.Current.Text
- TextBox2.Text = ListBox1.Current.Text
- Wait 0.1
Posted
Guru

My guess is you have things also set to events like ListBox1_Click.
If you set ListBox1.Index and then use Wait the ListBox1_Click event will trigger before you are done.
If you want to set something like a listbox but not trigger it's events try using Object.Lock()
Code (gambas)
- 'nothing more to advance
- ValueBox1.Value = lb1count.Value - 1
- TextBox2.Text = ListBox1.Current.Text
- TextBox2.Text = ListBox1.Current.Text
- ' Wait 0.1 ' nope , don't do it, it really should not be needed,
All my programs have a function called SetProp to set an objects property by locking it first so i can set properties without triggering events
Note: some events can trigger even if locked, depending on the control.
Posted
Regular

Posted
Regular

1 guest and 0 members have just viewed this.


