Results 1 to 15 of 15

Thread: label backcolor = menustrip1 backcolor

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2009
    Location
    Los Angeles
    Posts
    1,335

    label backcolor = menustrip1 backcolor

    I am trying to make the backcolor of a label I have to place on my menustrip be the same color as as the menustrip
    I tired:

    Me.list1lbl.BackColor = Me.MenuStrip1.BackColor, but the color is still grey

    Anyone have any ideas how to do this, i want to make the label blend with the strip so you just see the font

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,422

    Re: label backcolor = menustrip1 backcolor

    does it have to be a label?
    you could just use a menuitem with no dropdownitems.

    alternatively:

    try this

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2009
    Location
    Los Angeles
    Posts
    1,335

    Re: label backcolor = menustrip1 backcolor

    Quote Originally Posted by .paul. View Post
    does it have to be a label?
    you could just use a menuitem with no dropdownitems.

    alternatively:

    try this
    Thought of that, but the labels need to be positioned over comboboxs, dont know how i would do that with menu strip

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: label backcolor = menustrip1 backcolor

    Why exactly would you place a Label over a ComboBox? If we know what you're actually trying to achieve then we can provide the best advice. You should always strive to provide a context for your question because we know nothing about your app going in.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2009
    Location
    Los Angeles
    Posts
    1,335

    Re: label backcolor = menustrip1 backcolor

    Quote Originally Posted by jmcilhinney View Post
    Why exactly would you place a Label over a ComboBox? If we know what you're actually trying to achieve then we can provide the best advice. You should always strive to provide a context for your question because we know nothing about your app going in.
    Well its not"over" better choice of words would have been above.
    the reason is i have 3 comboboxes and want to label what each one does
    i.e
    List1
    List2
    List3

    I am running tight on my space on my form and trying to prevent it being so big that you have to scroll

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: label backcolor = menustrip1 backcolor

    So, you mean that you want:
    Code:
    Label
    ComboBox
    rather than:
    Code:
    Label ComboBox
    Is that correct?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2009
    Location
    Los Angeles
    Posts
    1,335

    Re: label backcolor = menustrip1 backcolor

    Quote Originally Posted by jmcilhinney View Post
    So, you mean that you want:
    Code:
    Label
    ComboBox
    rather than:
    Code:
    Label ComboBox
    Is that correct?
    Exactly, and the label ends up on my menustrip

  8. #8
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: label backcolor = menustrip1 backcolor

    billboy.

    Add a panel to your form, and set its Dock property to top. Then right click on the panel and select "SendToBack" this will put the panel at the top of the form, above your menustrip. Then you can add labels to this panel, and position them however you want. This will give you more freedom over the layout of things, since trying to use just a menustrip, or labels on top of it, or toolstrip, will limit your options.

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2009
    Location
    Los Angeles
    Posts
    1,335

    Re: label backcolor = menustrip1 backcolor

    Quote Originally Posted by kleinma View Post
    billboy.

    Add a panel to your form, and set its Dock property to top. Then right click on the panel and select "SendToBack" this will put the panel at the top of the form, above your menustrip. Then you can add labels to this panel, and position them however you want. This will give you more freedom over the layout of things, since trying to use just a menustrip, or labels on top of it, or toolstrip, will limit your options.
    Thanks thats soemthing i didnt know i could do, but i dont want the labels higher then the menu strip

  10. #10
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: label backcolor = menustrip1 backcolor

    I thought you said you want labels above the comboboxes that are in the menustrip?

  11. #11

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2009
    Location
    Los Angeles
    Posts
    1,335

    Re: label backcolor = menustrip1 backcolor

    Quote Originally Posted by kleinma View Post
    I thought you said you want labels above the comboboxes that are in the menustrip?
    No my combobox's are on my form at very top I want the label , combo1 combo2 etc.. right above them so they have to go in menu strip

  12. #12
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: label backcolor = menustrip1 backcolor

    like this? or different?
    Attached Images Attached Images  

  13. #13

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2009
    Location
    Los Angeles
    Posts
    1,335

    Re: label backcolor = menustrip1 backcolor

    Quote Originally Posted by kleinma View Post
    like this? or different?
    thats it

  14. #14
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: label backcolor = menustrip1 backcolor

    That is using my suggestion above to put a panel on the form and make it dock to the top above the menustrip.

  15. #15

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2009
    Location
    Los Angeles
    Posts
    1,335

    Re: label backcolor = menustrip1 backcolor

    Quote Originally Posted by kleinma View Post
    That is using my suggestion above to put a panel on the form and make it dock to the top above the menustrip.
    Oh ok, I misunderstood you I thought the panel was going to go up higher on the part that says "Form"
    I'll try that as soon as i get my picture behavior resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width