creating checkbox menus

  • Thread starter Thread starter Lalasa
  • Start date Start date
L

Lalasa

Hi there,

How can I create a checkbox menu. Ex: If I have 'auto' and
'manual' submenus under 'Trend' Menu I should be able to see a check
mark before 'auto', if I click 'auto'. If I click 'Manual', the
checkbox before 'auto' should disappear and there should be a check
mark before 'Manual'. Which means I can have my trend as 'auto' or
'Manual' at a given point of time but not as both.

If 'Manual' is clicked :
Trend
|
|___ auto
|
|___ v Manual


If 'auto' is clicked:

Trend
|
|___v auto
|
|___ Manual


Thanks,
Lalasa.
 
Trend
|
|___ auto
|
|___ v Manual


If 'auto' is clicked:

Trend
|
|___v auto
|
|___ Manual


Thanks,
Lalasa.

Create an event handler for the "DropDown" event of the owning menu (i.e.
Trend in this case). On that event, set the individual menu items "checked"
property to true/false.

For example:

void OnTrendDropDown(sender object, eventargs e)
{
m_TrendAuto.Checked = m_bAutoMode;
m_TrendManual.Checked = !m_bAutoMode;
}

Hope this helps.

Brian.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top