Toolbar

S

Stuart Nathan

I am using vb.net

I have written my own usercontrol button.
I am writing a usercontrol toolbar using these buttons.
I have written a collection class (Button Collection) to contain these
buttons.
On my toolbar control I have this code:-
<DesignerSerializationVisibility(DesignerSerializationVisibility.Content), _
EditorAttribute(GetType(CollectionEditor), GetType(UITypeEditor))> _
Public Property Buttons() as ButtonCollection
etc.

Now when I add the Toolbar Control to a new form, I see in then properties
window the Buttons collection and this allows me to add, remove buttons etc.

And they persist because you see on the host form the various Dim statements
etc.
BUT you don't see the MyToolBar.AddRange (New myButton() {etc...

Any ideas.
 
S

Stuart Nathan

Since posting this, I reworked my Add routine and now it sort of works,
except
If I am in the editor and I add another button, the last button displays
properly (but I do have to shut the form and reload it). However the last
button is never written properly in the initializecomponent method, as some
of its properties get lost. Also VS then adds a myToolbar.add method for
each of the previous buttons, so that they load twice.

Is theer somewhere I need to look?
 
B

Brian Henry

anyway to do it with an external browser though? would be a little bit
obtrusive to write a web browser host for the control so you had back
forward etc...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top