CheckBox problem

Any template questions or comments or suggestions

CheckBox problem

Postby tomas.zeman on Thu Oct 23, 2008 10:22 am

I have 2 controls, ComboBox, CheckBox.

My scenario:
User decides whether he checkes CheckBox or not. Checked state is valid only if an item in ComboBox is selected. I Want to display an error message when user tries to check CheckBox without selecting item in ComboBox

My first idea...
in onclick event of checkBox

Code: Select all
if(control.Checked && !isSomethingSelected)
{
DisplayError("Please select an item.");   //Windows.Forms.MessageBox.Show(...);
control.Checked= false;
return;
}

Unfortunatelly, this doen't work, checkbox stays checked.

How can i achieve this functionality? Thanks for any help
tomas.zeman
Lurker
 
Posts: 4
Joined: Wed Oct 22, 2008 1:52 pm

Re: CheckBox problem

Postby justin.greenwood on Fri Oct 24, 2008 2:20 pm

Is this for a template input interface form? Can you paste more of the code in so I Can see it in context?
User avatar
justin.greenwood
Site Admin
 
Posts: 441
Joined: Sat Apr 03, 2004 6:10 am
Location: Indianapolis, IN

Re: CheckBox problem

Postby tomas.zeman on Wed Nov 05, 2008 9:55 am

Thanks for answer and care Justin, I decided to stop any experiments with zeup API after I made source inspection via reflector. Everything is wired(controls, events etc.), I cannot profit from inheritance, designer and that problems i posted cannot be solved in this framework. I just finish set of win form picker controls above MyMeta with cascading behavior that are richer, nicer than any COPY&PASTEd lame zeus gui code spreaded through existing templates and I'm able to create GUI for templates more quickly, with less(less less less :-) of code and with designer support. ZEUS API was good for people who wanted to create simple GUI and don't wanted to buy VS ... before VS EXPRESS C# was released.
tomas.zeman
Lurker
 
Posts: 4
Joined: Wed Oct 22, 2008 1:52 pm


Return to General Template Questions/Comments

Who is online

Users browsing this forum: No registered users and 4 guests

cron