ThemedLinkMenu in inherited form


Author
Message
Alex Bibiano González
Alex Bibiano González
StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)
Group: Forum Members
Posts: 31, Visits: 125
Excuse me for the lot of questions I'm asking in the last days, but I'm just starting learn SF Crying

I have just created a base form with a ThemedLinkMenu. Now I have inherited some forms and want to add diferent ThemedLinkMenuItem's, but the item's collection is readonly in the derived forms. I have already changed the ThemedLinkMenu modifier to protected, but it's still readonly.

What I'm missing?

Lot of thanks for your time.

Alex B.


Reply
Les Pinter
Les Pinter
StrataFrame Team Member (95 reputation)StrataFrame Team Member (95 reputation)StrataFrame Team Member (95 reputation)StrataFrame Team Member (95 reputation)StrataFrame Team Member (95 reputation)StrataFrame Team Member (95 reputation)StrataFrame Team Member (95 reputation)StrataFrame Team Member (95 reputation)StrataFrame Team Member (95 reputation)
Group: Forum Members
Posts: 43, Visits: 213
Hi Alex,

   I see what you mean; the problem is that the ThemedLinkMenu is marked Read-Only when inherited if the Collection contains any items. That's probably by design, although you can get around it by adding the initial selections in code in the base form's constructor:

    { InitializeComponent();
      ThemedLinkMenuItem themedLinkMenuItem1 = new ThemedLinkMenuItem();
      themedLinkMenuItem1.Key = "Exit";
      themedLinkMenuItem1.Title = "Exit";
      themedLinkMenu1.ItemCollection.Add( themedLinkMenuItem1 );

But your event handler in the forms that derive from it need to handle the default ("Exit" in this case). I also noticed that removing a ThemedLinkMenuItem in the base form's Items Collection doesn't visually clear it from the ThemedLinkMenu. I'm sure Trent has thoughts on the matter.

Les

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search