How can I show a tooltip on a toolbar button...

  • Thread starter Thread starter Peter Villadsen
  • Start date Start date
P

Peter Villadsen

I know that it's not supported out of the box. Does anyone have an example
where the mouse click is intercepted and a panel opened, or something like
that? Many commercial programs do this, and it seems like a good user
experience, so it's too bad it is not possible.

Best Regards

Peter Villadsen
 
Thank you very much. It works as advertised.

You are a credit to Net CF development in general and to this group in
particular.

BR Peter Villadsen
 
Alex, thanks for the great sample!

If you are trying Alex's sample code, you may find these two observations
useful:
1. If you have a menu defined as well as a toolbar, you must add tooltips
for the menu items as well as the toolbar buttons. This maybe an obvious
thing, but when the tool tips were not working I thought something was wrong
with the code I adopted from Alex's sample or there was a problem with the
order of execution. Instead the problem was with my string array.

2. Alex's sample will not display the tooltip icons on a 2003 SE device due
to a known NETCF problem. Moving the "this.toolBar1.ImageList =
this.imageList1;" line of code from the InitializeComponent to the top of
the Form1_Load method will solve this.

- Rich
 
Rich M said:
Alex, thanks for the great sample!

If you are trying Alex's sample code, you may find these two observations
useful:
1. If you have a menu defined as well as a toolbar, you must add tooltips
for the menu items as well as the toolbar buttons. This maybe an obvious
thing, but when the tool tips were not working I thought something was
wrong with the code I adopted from Alex's sample or there was a problem
with the order of execution. Instead the problem was with my string array.

Good point. So, how did you resolve the issue with the dropdown menu?
 
I have 4 menu items and two toolbar buttons appearing on my form. My string
array is defined as:

string[] tooltips = new string[] {
string.Empty, // Menu item New
string.Empty, // Menu item Note
string.Empty, // Menu item View
string.Empty, // Menu item Tools
"Filter", // Tooltip for first toolbar button
"Find"}; // Tooltip for second toolbar button

I assume the menu item "tooltips" are unused by the native control.

- Rich
 
I see. The thing is that the documentation states that tooltips are
supported for menus and comboboxes for CE.NET 4.2 and newer.

--
Alex Feinman
---
Visit http://www.opennetcf.org
Rich M said:
I have 4 menu items and two toolbar buttons appearing on my form. My string
array is defined as:

string[] tooltips = new string[] {
string.Empty, // Menu item New
string.Empty, // Menu item Note
string.Empty, // Menu item View
string.Empty, // Menu item Tools
"Filter", // Tooltip for first toolbar button
"Find"}; // Tooltip for second toolbar button

I assume the menu item "tooltips" are unused by the native control.

- Rich

Alex Feinman said:
Good point. So, how did you resolve the issue with the dropdown menu?
 
Back
Top