Posted 18 years ago
by JohnH
![Avatar](https://secure.gravatar.com/avatar/ecad731d6e86a5ff1d6b4034e45282e3.jpg?s=64&d=identicon&r=g)
RE: UIStudio version 2/Bar Control/.NET Framework 2.0
The form Designer generates this code:
ActiproSoftware.UIStudio.Bar.BarButtonLink fileNewBarButtonLink = new ActiproSoftware.UIStudio.Bar.BarButtonLink(fileNewBarButtonCommand);
So at runtime, I want to set some properties on this BarButtonLink. How do I get a reference to this BarButtonLink at runtime?
I've tried every thing I can think of. For example, this seems like it should work, but bbc returns null.
BarButtonCommand bbc = (BarButtonCommand)barManager.MenuBar.CommandLinks["File.New"];
"Newing-up" a BarButtonLink doesn't work either.
For a test, if I scope fileNewBarButtonLink to be public, then I'm all set; I have the reference that I want, but, of course, the designer will overwrite the changes.
Thanks!
The form Designer generates this code:
ActiproSoftware.UIStudio.Bar.BarButtonLink fileNewBarButtonLink = new ActiproSoftware.UIStudio.Bar.BarButtonLink(fileNewBarButtonCommand);
So at runtime, I want to set some properties on this BarButtonLink. How do I get a reference to this BarButtonLink at runtime?
I've tried every thing I can think of. For example, this seems like it should work, but bbc returns null.
BarButtonCommand bbc = (BarButtonCommand)barManager.MenuBar.CommandLinks["File.New"];
"Newing-up" a BarButtonLink doesn't work either.
For a test, if I scope fileNewBarButtonLink to be public, then I'm all set; I have the reference that I want, but, of course, the designer will overwrite the changes.
Thanks!