Problem with combobox. up and down buttons

Joel1334

New member
Joined
Oct 30, 2008
Messages
3
Programming Experience
Beginner
Hi! can someone please help me with this problem.

it's like this.. I've got one combobox that gets a textvalue from an ini-file like this:

[engines]
1=engine 1
2=engine 2
3=engine 3

and besides the combobox there is two buttons called "up" and "down"

if you choose "engine 1" I want the two buttons to call two different variables called "Engine1Up" and "Engine1Down" and if I choose "Engine 2" I want the two buttons to call the variables called "Engine2Up" and "Engine2Down"

how do I do this?
 
You'll need to explain yourself a little more, how can buttons call a variable? Variables hold values or references, you cannot call a variable like you can a method (sub/function).
 
What you can do is use the combobox's selectedindexchanged event to set a string variable to the text of the script that'll run when the button's clicked, then of course in the button's click event run the script based on the variable set from the combobox.
 
Back
Top