Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
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 10-Jan-13 23:22pm
Comments
Fredrik Bornander at 11-Jan-13 5:54am
   
WinForms or WPF?
TechXSoftware at 11-Jan-13 20:49pm
   
WPF, but both would be good
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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...
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
TechXSoftware at 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 at 14-Jan-13 2:55am
   
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)

  Print Answers RSS
0 OriginalGriff 469
1 ChintanShukla 305
2 Sergey Alexandrovich Kryukov 253
3 RyanDev 250
4 Richard Deeming 250
0 Sergey Alexandrovich Kryukov 8,906
1 OriginalGriff 7,601
2 CPallini 2,603
3 Richard MacCutchan 2,121
4 Abhinav S 1,923


Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 11 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100