CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Question Menu item alignment

    In another Windows Forms toy app, I have added a menu strip to the main form. As you can see in the attached screen shot, the menu item ("Beenden") exhibits a small problem: It is not really left-aligned, although the TextAlign property is set to MiddleLeft. The equivalent setting, however, works fine for the menu itself ("Datei"), as you can see in the same screen shot as well. Are there any other property settings interfering that I might have failed to take into account, or what else might be wrong here?

    TIA
    Attached Images Attached Images  

  2. #2
    Join Date
    Jul 2002
    Posts
    2,543

    Re: Menu item alignment

    This is the place for an icon. Try to find some property which disables icons display in a menu - just my guess.

  3. #3
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: Menu item alignment

    Quote Originally Posted by Alex F View Post
    This is the place for an icon. Try to find some property which disables icons display in a menu - just my guess.
    Good point, one that I already thought of myself - at least I though I had. In fact, the DisplayStyle property was set to ImageAndText. (I already had changed that, however, in the "Ansicht" menu right next.) But changing that to Text didn't change the appearance either. The Image property, BTW, is (and has always been) set to (none).

    Any other Ideas?

  4. #4
    Join Date
    Jul 2002
    Posts
    2,543

    Re: Menu item alignment

    Well, maybe there is old-style menu available in .NET - I remember that it was included in the first .NET versions. Anyway, for such kind of problems it is better to ask in C# forums - there is a lot of information available there.

  5. #5
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: Menu item alignment

    Quote Originally Posted by Alex F View Post
    Anyway, for such kind of problems it is better to ask in C# forums - there is a lot of information available there.
    Ok, I'll consider doing a search on that section and ask there if that reveals nothing, and unless someone happens to come around here and tell me about a solution.

    In the meantime I have something to do with the other app, the one with the (lacking) background worker issue.

    And you don't think they'll kick me out over there once they figured out that I'm using C++/CLI?

  6. #6
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: Menu item alignment

    I just did a forum search on all .NET-related sections, went back down to january '09 and didn't find a solution for the menu item issue. I did find, however, a thread (more precisely: a single post without any reply) from another guy who encountered the same issue. The thead was from somewhere in '09, thus apparently this issue isn't limited to MS' 2010 developer products.

    And I stumbled into a solution for the X button issue discussed in the UseWaitCursor thread!

    On second thought: Does it make sense at all to ask this one in the C# section? They have WPF there, so why should they know details about Windows Forms?
    Last edited by Eri523; August 28th, 2010 at 07:54 PM.

  7. #7
    Join Date
    Jul 2002
    Posts
    2,543

    Re: Menu item alignment

    A lot of C++/CLI questions remain unanswered because there are no many C++/CLI programmers, and only few of them make UI in C++/CLI. In general .NET (C#, even VB) forums it is possible to get information which is not available in C++/CLI. Translation between there languages is very easy.
    Right, WPF is now very popular, but many C# programmers still use Windows Forms.
    It is a good idea to ask C++/CLI-specific questions here, and general .NET questions in some C# forum.

Tags for this Thread

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

Featured