Levi101
asked on
Using a combobox C++
I have an assignment for uni. I'm to create an app that shows a shape selected from list within a combo box.
I have entered the
following items in the OptionComboBox
Square
Circle
Triangle
My overall design was
OnChange
if selection = square then
displaysqaure
else
if selection = circle then
display circle
else
if selcetion = triangle then
display triangle
else don nothing
Guidance on how to use the combo box and it events would be great.
Thanks
St
Stefan
I have entered the
following items in the OptionComboBox
Square
Circle
Triangle
My overall design was
OnChange
if selection = square then
displaysqaure
else
if selection = circle then
display circle
else
if selcetion = triangle then
display triangle
else don nothing
Guidance on how to use the combo box and it events would be great.
Thanks
St
Stefan
The code you've posted above bears little resemblance to C++. Are you programming in C++ or some other language?
ASKER
Sorry it is C++
In that case I think you need to work on this a bit more yourself. The Experts Exchange site policy prohibits experts from doing your homework for you. It's one thing to say, "please look at what I've done and help me figure out why it does this vs. what it's supposed to do." But you're basically saying, "I haven't really done anything, please do it for me..." That's not what this site is about.
Hey Levi101
jhance has a point.
but still if you need a jump start, and as I suspect this combo box, is not the heart of the project, I will try to assist:
1) first what OS are you using? (your pseudo code smells like VB which is a hint towards windows, but it is not clear)
2) if the OS is clear, are you using any GUI library ?(MFC, ATL, DotNet windows forms etc.)
answer those, and you'll get the start point for your project
jhance has a point.
but still if you need a jump start, and as I suspect this combo box, is not the heart of the project, I will try to assist:
1) first what OS are you using? (your pseudo code smells like VB which is a hint towards windows, but it is not clear)
2) if the OS is clear, are you using any GUI library ?(MFC, ATL, DotNet windows forms etc.)
answer those, and you'll get the start point for your project
ASKER
Jhance
I'm not asking you to do my homework, I am simple asking for guidance on how to use the Onchange property of the combobox. I could use buttons or even a menu. However i feel it's cleaner if i use a combobox. I have refered the borland help and draw a blank. If it makes you feel any better the the bit I'm strugling with is the variable selction ie.
if user selects options one, where is the variable and how do I use it eg if (SelctionV = OptionCombo->item->Option 1);
yotamaster
I'm using borland C++ and its libaries, the OS is windows.
I'm not asking you to do my homework, I am simple asking for guidance on how to use the Onchange property of the combobox. I could use buttons or even a menu. However i feel it's cleaner if i use a combobox. I have refered the borland help and draw a blank. If it makes you feel any better the the bit I'm strugling with is the variable selction ie.
if user selects options one, where is the variable and how do I use it eg if (SelctionV = OptionCombo->item->Option 1);
yotamaster
I'm using borland C++ and its libaries, the OS is windows.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.