Combo / Menu items

  • Thread starter Thread starter Jim K.
  • Start date Start date
J

Jim K.

I am wondering how one would would implement the type functionality
that shows up in the header of standard PPC applications like the
explorer and "Tasks". Specifically, if you start "Tasks" for example,
the header text defaults to "No Categories" when pressing this, the
text immediately changes to "Show" and a context menu pops up and
allows you to change to another value at which point, the menu is
checked and the header text changes again. This appears to be a
combined combo/menu control of some sort.

How can this functionality be implemented in CF? If so, what is the
approach. Am I missing something simple?

Thanks.
 
I can't followup your sample for Tasks (have a German Mashine) but I have
the fealing
that this a reaction to a contextMenu that you are talking/writing about.

contextMenuTreeLotto.Popup += new
System.EventHandler(this.contextMenuTree_Popup);
this.treeViewLotto.ContextMenu = this.contextMenuTreeLotto;

Most Controls (please check) should support this.

Allthough (if I remember correctly) not Documented for Compact it also works
there.

The Method contextMenuTree_Popup is called by the right MouseClick
(PointingDevice - red circle).
You must know from what type of Control your are calling from (here
TreeView).
Here you can set the Text of any Controls you want (and that is what you
want do do-right)
Depending on the Controls you use, you determin what Menu-entrys in the
contexMenu should be shown :

if (t_TreeNode.SelectedImageIndex == 0) // Übersicht
{
menuItem_S_L01.Visible = false;
}

When the Method ends, the contextMenu will be shown and any other changed
Text will be shown.

Hope this helps.

Mark Johnson, Berlin Germany
(e-mail address removed)
 
Back
Top