Posted 19 years ago
by JohnH
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!