FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Enabled menu items are shown grayed

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
maxter



Joined: 17 May 2006
Posts: 34

PostPosted: Fri Sep 28, 2007 12:52 pm    Post subject: Enabled menu items are shown grayed Reply with quote

Code:

    override void onLoad(EventArgs ea)
    {
        menu = new MainMenu;
        auto mi = new MenuItem;
        menu.menuItems.add(mi);

        mi.text = "Test";

        //Workaround:
        //if (mi.enabled)
        //    mi.enabled = true;

        super.onLoad(ea);
     }


Works fine if text is set before the menu item is added to the menu's collection
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Fri Sep 28, 2007 10:32 pm    Post subject: Re: Enabled menu items are shown grayed Reply with quote

It looks like Windows might be disabling menu items automatically if they're added with no text. I just put up a snapshot that re-enables as necessary.
Back to top
View user's profile Send private message
maxter



Joined: 17 May 2006
Posts: 34

PostPosted: Sat Sep 29, 2007 3:57 am    Post subject: Reply with quote

Thsnks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group