We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

BarItem.ID

Thread ID:

Created:

Updated:

Platform:

Replies:

12690 Apr 7,2004 09:52 PM UTC Apr 14,2004 09:57 AM UTC WinForms 5
loading
Tags: Tools
Lance Levendowski
Asked On April 7, 2004 09:52 PM UTC

The help for the BarItem.ID property states, "Should be unique among all the BarItems in a BarManager, if added to a BarManager." But, can somebody please tell me if it is important to use the same value for the ID property between different instances of the application? For example, if I set BarItem1.ID = "1" and then exit the app (at which time the menu state is serialized), do I need to make sure that BarItem1.ID is set back to "1" when the app is restarted, or could I set BarItem.ID to any other unique value? Also, if I can use any unique value when the app is restarted, then why not just generate a unique value in the constructor? For example, do something like this: Private idValue As Long = 0 Public Sub New(...) Me.ID = idValue.ToString idValue += 1 End Sub Thanks for any help. Lance

Administrator [Syncfusion]
Replied On April 11, 2004 08:12 AM UTC

Hi Lance, I have requested the development team for more information on BarItem.ID property, and will update you on this as soon as possible. We appreciate your patience and cooperation. Regards, Guru Patwal Syncfusion, Inc.

Lance Levendowski
Replied On April 12, 2004 01:29 AM UTC

Sounds good. I''ll keep checking back periodically. Thanks, Lance

Administrator [Syncfusion]
Replied On April 13, 2004 04:35 PM UTC

Hi Lance, The BarItem.ID is a unique value generated by the BarItem class. This ID is used to store/restore the state information of that particular BarItem when the menu is persisted/depersisted. If you wish to explicitly set ID values before persisting menu state information, in that case, you would also have to explicitly set the same ID values once again before restoring the persisted state information. Any changes in the ID value will not restore the persisted state correctly. In case of multiple instances of the application, BarItem information will not be overwritten since they will be scoped under the MainFrameBarManager''s persistence ID which is always unique. Please let me know if you need nay other information. Regards, Guru Patwal Syncfusion, Inc.

Lance Levendowski
Replied On April 14, 2004 01:55 AM UTC

Thank you for your help on this issue. I create many of my menu objects dynamically in response to values that the user can modify (such as an array of user-defined colors). Therefore, using the same ID could be problematic. I will submit a Direct-Trac incident if I can not come up with a solution. Thanks again, Lance

Administrator [Syncfusion]
Replied On April 14, 2004 09:57 AM UTC

Hi Lance, Thanks for the update. The BarItem.ID gets automatically generated (unique value based on the BarItem''s Text value), even if you were to create your menus and toolbars dynamically. As long as you do not explicitly change the ID value, our XPMenus framework will take care of this while persisting/depersisting menu state information. However, please feel free to create a DirectTrac incident if you need any assistance. We appreciate your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;