[RESOLVED] Drawing/Placing a "circle" or Image on a button (Like a notification in iOS)
I cant seem to get this figured out...
I have a button, that i would like to have a notification of saved items. (not important detail: user saves a "sale" for later... button will show ( 1 ) in upper right.. like iOS)
so, how do i get a red circle with a 1 to show!??
Placing a circle shape wont cover the button..
drawing a circle doesnt cover (go over) the button...
Using a picture box doesnt have a transparent background...
I will need to be able to display/hide it as well...
?? Help?
Thanks!
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
Re: Drawing/Placing a "circle" or Image on a button (Like a notification in iOS)
The only way to do this in VB would be to create a new borderless, transparent form to draw the overlay on and show that, as far as I'm aware. It won't be easy getting it to line up and keeping it on top though!
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
Re: Drawing/Placing a "circle" or Image on a button (Like a notification in iOS)
I am sure Dunfiddlin solution is the correct way, but it occurs to me you could always create your own control which inherits the button class. Make the backcolor transparent. Move the button text to the bottom.
use properties to load whatever image you want into the button.
You could add a label which overlays the button when you need it and display the count in it.
Belieive me, I am no expert and it is probably only my ignorance talking, but I am going to give this a try when I get home from work.
Re: Drawing/Placing a "circle" or Image on a button (Like a notification in iOS)
it seems that simply adding a "circle" image in a picturebox, setting the parent to the button (thats key!), and a label on top works fine! i cant have it hanging over the edge but not really concerned with that.
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
Re: Drawing/Placing a "circle" or Image on a button (Like a notification in iOS)
Originally Posted by Static
it seems that simply adding a "circle" image in a picturebox, setting the parent to the button (thats key!), and a label on top works fine! i cant have it hanging over the edge but not really concerned with that.
that's because transparency in vb.net only shows the transparent control's parent
Re: [RESOLVED] Drawing/Placing a "circle" or Image on a button (Like a notification i
i cant have it hanging over the edge but not really concerned with that.
Now, if you'd led with that!
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!