Click here to Skip to main content
15,501,075 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I was wondering if it is possible to click a button while a label is ontop of a button, the reason for it is to make like a notification number just like you get in an ios on those application icons, but this is with a button and a label.

for example I simply just drag a label over a button. But I don't want the label to just repeat the actions of the button that had been pressed.

so the label could be in the way of the user when they press the button, I want the label to kinda be apart of the button so then when the label is pressed it dose not, not do anything.

so I was wondering if this is possible, and if so, please give me information on it.
thank you

P.S - please don't leave comments/answers like, you are a begginer programmer and you suck, and don't even talk about the question, its just rude.
Posted
Comments
Fredrik Bornander 11-Jan-13 5:54am    
WinForms or WPF?
[no name] 11-Jan-13 20:49pm    
WPF, but both would be good

In WPF there is a possibility to add a label directly on a button by using ControlTemplates:
stackoverflow.com[^]
MSDN[^]
wpftutorial.net[^]


IDK about a solution for winforms but you may have to use a tool tip...
 
Share this answer
 
Have you tried to add a tooltip? To do this: Just drag a ToolTip item from your toolbox on your form. The select your button, and add a text in the ToolTip on toolTip1 property. This is the text you will see when you hover with your mouse over the button.
 
Share this answer
 
Comments
[no name] 11-Jan-13 18:15pm    
Is it possible to have this tooltip shown all the time on the button with-out having to hover the mouse over it?
Frans Jan 14-Jan-13 2:55am     CRLF
I don't know about that, but maybe this post helps: http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/464d3388-0db9-4755-8d5f-ebe2593ce8c2 or: http://stackoverflow.com/questions/896574/forcing-a-wpf-tooltip-to-stay-on-the-screen I also found that you can click through a label when you set the property "Enabled" to false

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900