I need to show the same toolbar across many pages. For some reason in the distant past I didnt just drag it onto the page I embedded it into a container control which I instantiated on each window. This led to problems with it sizing properly across the window and Im now trying to fix that. I was going to just subclass the toolbar to add all the items and handlers and methods that are common to all the pages and create events for the specific things.
The problem is that I cant seem to actually edit the toolbar from a subclassed control. I can add events and methods and such, but I cant actually add toolbar items via the edit interface that I get when the control is dragged into a window.
Is it just that there is no way to subclass the toolbar and include its toolbar items and menus and such? Or am I missing the secret menu item that switches the subclass to edit mode? I can, of course, cut and paste the toolbar from each window into each other menu but then if I have to make a change to the layout I have to make it in a dozen places rather than one.
[quote=223489:@Norman Palardy]Been informed there is no support for this
Certainly not in the runtime javascript
So even if it worked in the IDE it wont work at run time[/quote]
This is making me think I wasnt clear in my initial question. I cant imagine that what I was trying to do has anything whatsoever to do with the javascript runtime? What ends up on the browser or being sent to the browser would be no different if the toolbar was the result of a subclass or a base class once its been dragged into a window would it?
I can subclass a toolbar and it works just fine. I can add event handlers and methods to it and then drag that into a window. What I cant do is add the toolbar items and names and such to the parent class. I can only do that once I drag it into a window. Why is it that there is no toolbar editor when its just a class the same as if its a class dragged into a window?
Thats fine, for now Ive just cut and pasted the same subclass of the toolbar into all my windows, but that seems wasteful and if I ever want to make a change to the name of a toolbar item Ill have to make it in one place and then cut and paste all over again. Or perhaps I should generate the toolbar items dynamically in code in the Open event or something
Michel, thats what I just stopped doing I could not get the toolbar to properly maintain its locked left and right position when it was inside a container control no matter what I did. It would NOT go to the edge of the window or it would not stop going past the edge of the window.
The locking mechanism is not perfect. You need to tweak controls size and placement to obtain better results. That is exactly how I came to develop RubberViews originally for my own use.
[quote=223495:@James Sentman]This is making me think I wasnt clear in my initial question. I cant imagine that what I was trying to do has anything whatsoever to do with the javascript runtime? What ends up on the browser or being sent to the browser would be no different if the toolbar was the result of a subclass or a base class once its been dragged into a window would it?
I can subclass a toolbar and it works just fine. I can add event handlers and methods to it and then drag that into a window. What I cant do is add the toolbar items and names and such to the parent class. I can only do that once I drag it into a window. Why is it that there is no toolbar editor when its just a class the same as if its a class dragged into a window?
[/quote]
For the same reason you cant edit the UI of a subclass of something like a segmented control, pagepanel or tab panel
Its not supported