Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / January 2008

Tip: Looking for answers? Try searching our database.

'Label' in a MenuStrip

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nvx - 27 Jan 2008 09:54 GMT
Hello,
is it possible to get a 'Label' control equivalent into the MenuStrip?
I tried to use disabled borderless TextBox instead of a
ToolStripMenuItem (I don't mind the text being grey), which was
alright except one thing: the BackColor of this control cannot be set
to Transparent. As a result, it had another background colour that the
rest of the MenuStrip. I am aware I can set whichever colour I want,
but even if I set it to match the menu, on another system with a
different Windows theme it would look ugly again...

I'd like to avoid the disabled ToolStripMenuItem too, because it
reacts to a mouse cursor hovering it (border around the item
suggesting it should be doing something, but is disabled now).

A labelled ComboBox control would be exactly what I need but I do not
see any possibility of adding the label to the ComboBox control
available in the MenuStrip.

Any help would be much appreciated.

Best regards,
nvx
Jack Jackson - 27 Jan 2008 18:17 GMT
Have you tried a ToolStripLabel?  I know it isn't recommended, but it
may work anyway.  Of course if it does work, it opens the possibility
of it not working in a future version.

Another possibility is to do some of the drawing yourself.  Maybe you
could use a ToolStripTextBox with a custom renderer to fix the aspects
of the drawing that you don't want.

>Hello,
>is it possible to get a 'Label' control equivalent into the MenuStrip?
[quoted text clipped - 18 lines]
>Best regards,
>nvx
nvx - 27 Jan 2008 20:05 GMT
Dear Jack,
thank you very much for the reply. I kind of didn't expect it to be
hidden there, since it is not visible in the form designer. It works,
which is important now. It it fails to work later, there will be some
other way of achieving this result for sure. It is only a label in a
menu so even if it stopped working - no real harm done.

Best regards,
nvx

> Have you tried a ToolStripLabel?  I know it isn't recommended, but it
> may work anyway.  Of course if it does work, it opens the possibility
[quoted text clipped - 26 lines]
> >Best regards,
> >nvx

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.