Hello Andrzej !
This looks good ... but .-)
The UIElement returned by xLayout->getElement() isnt the menu bar
object. It's a wrapper around it. You have to query this xMenu object
for it's XPropertySet interface and ask for it's property "XMenuBar".
This property can then be used as XMenuBar reference to be set on a
XTopWindow->setMenubar() call.
Yes, I know, I used the wrong term in my post. I meant the UIElement -
I can't get it from the layout manager, nor can I create it :-(
I don't know why this happens. If I run this code
<snip>
it works fine.
OK ... you are right ... I've overlooked something important. It cant
work so. Why ?
You created a new frame and the document will be loaded later into this
frame. Of course without a document inside you cant retrieve nor create
menubars or toolbars. So you have do it later. But how ?
I think, you should listen on the frame you created new as
css.frame.XFrameActionListener. There is an event
frameAction(...COMPONENT_ATTACHED...). That indicates the fact, that a
new document was loaded into this frame. After the first
COMPONENT_ATTACHED event was send to you, you can deregister yourself.
Because you dont need to listen for further events here / I hope .-)
<snip>
Yes, but doesn't it make a difference which frame you are using for
retrieving the
XLayoutManager ? I mean is the layout manager a singleton or is it
something that
each frame has ? I think the latter, and then if I get a LayoutManager
for a frame that
isn't contained in a TopWindow I won't find the menubar UIElement there.
But I still
should be able to create one, right ?
1 Frame has 1 LayoutManager assigned to it.
1 Frame has 1 Window (which must not a TopWindow!)
e.g. in your case all Frames contains child windows,
which are childs of the TabControlWindow ....
which itself is a child of the real TopWindow
.-))
<snip>
No problem, could you put the TabController's source code somewhere
where I could see it?
I'm interested in how it's done.
I will send a private email to you, where I'll attach the source.
Regards,
Andrzej
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]