I have a program with a lot of buttons, and need to put a tooltip on every single button. Every buttton has its own text describing what it does. I would put a tooltip on every button, and add the text to the tooltip, but I guess that its not a very efficient way to do it. What would be the best way to put a tooltip on every item I wish with its own text?
thanks
Related
What will be the best approach to embed a datagridview like thing inside tooltip.
I would like to display useful information in an organized way inside tooltip control on MsChart rather than just displaying simple text info using callout or standard tooltip
I have tried using form as a tooltip but the main form gets focus lost when tooltip form is displayed.
Can anyone point me in right direction or give an approach which will be same in behavior as standard tooltip.
Thanks.
I have a panel that fills with icons of characters. I have a second panel I would like to fill with icons from which character is selected. What is the best way to know which character was selected? Both panels are flow layout panels. I can hover over the character and display the name but I need a good way to reference which character is clicked. The entire object is a user control and another object that retrieves the champion icons to fill the first panel. Thank you.
You need to handle the form.KeyPress event.
Control.KeyPress Event
Examine the KeyEventArgs and go from there.
I'm using a NSTextView with an NSAttributedString to display some links using the NSLinkAttributeName. I'm styling those links using the setLinkTextAttributes: method of NSTextView. However, I would like to give the user a visual feedback when he clicks the link, for example by changing the color of the link while the user pressed down the left mouse button. Is there an easy way to do that or do I have to use NSTextAttachment?
I don't think there is an easy way to do this if you want it to happen on the mouseDown event. If you can wait until the click is completed, then you can do it using the text view delegate method, textView:clickedOnLink:atIndex: to get the index of the clicked on link. You could then use that index to pass to the text storage method, attributesAtIndex:effectiveRange: to get the range of the link and finally, use setAttributes:range: to make whatever changes you want to the attributes of the link.
If you really need to do it on the mouseDown, then you'll have to subclass the text view and override mouseDown and maybe use something like characterIndexForPoint: to find out whether you've clicked on a link and respond as above.
i have my button:
completely trasparent, text in white.
But when i click it, the background goes white and the text black, and it seems to move up :-|
i want only execute the action, i don't want those strange effects. any ideas? thanks!
That's the default behaviour of Button control,
if you want to avoid it you have some options:
Use another control like textBlock and use OnMouseLeftButtonDown/Up
Customize the template of your button: See the link bellow, this is default style of a button, you can copy/paste the Template part and modify it as you want. (You need to play with different visual states)
http://msdn.microsoft.com/en-us/library/cc278069(v=vs.95).aspx
I have a small application in which I need to show alerts if a particular condition is met. I have an mdi form and several child forms. Now the best way to show an alert is to show a tooltip on the right side corner of my mdi form. Though this works, but the problem is I want user to close the tooltip once he has read.
Now the tooltip that vb.net provide does not support click events. If I give a long time duration the tooltip would be open all the time and if I give a short duration then it will close quickly.
What can I do ?
Help will be appreciated.
Thanks,
GR
You might consider a statusbar at the bottom of the window instead of a tooltip (like at the bottom of Word). You can intercept clicks on those, split the bar into several sections as necessary, etc.
Alternately, I'd probably code up a little pop up form with no border, min/max.close buttons etc, like a toast message, and show it as necessary, Stick an RTF control on it and you're "tooltips" can be very richly formatted, add a timer and the window can disappear after a short timeout, or intecept the click and close it manually.