OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Bring control ToFront in dialog

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
Dennis Jelavic
Power User
Power User


Joined: 13 Nov 2008
Posts: 67

PostPosted: Mon Nov 17, 2008 4:02 pm    Post subject: Bring control ToFront in dialog Reply with quote

I want to place a list box (initially not visible) on top of text edit controls in a dialog. It works fine apart from one simple thing - the text boxes display on top of the list box. I have executed Setfocus() on the listbox control and the only ToFront() method I can find is in XTopWindow.

How can I display the dialog so that the list box is on top of the textboxes when it is made visible.

Thanks
Back to top
View user's profile Send private message
B Marcelly
Super User
Super User


Joined: 12 May 2004
Posts: 1453
Location: France

PostPosted: Tue Nov 18, 2008 1:07 am    Post subject: Re: Bring control ToFront in dialog Reply with quote

Hi,
Dennis Jelavic wrote:
How can I display the dialog so that the list box is on top of the textboxes when it is made visible.

In the IDE you must see the listbox above the text edit controls.
The z order follows the value of the property Activation order in the control Property window. You may change the value for the list box.
______
Bernard
Back to top
View user's profile Send private message Visit poster's website
Dennis Jelavic
Power User
Power User


Joined: 13 Nov 2008
Posts: 67

PostPosted: Tue Nov 18, 2008 1:54 pm    Post subject: Reply with quote

Thanks Bernard,

If by Activation order you are referring to the TabStop order then the listbox does indeed display on top of the textboxes. However you can select any of the items displayed in the list box except those that display where the list box overlays the textbox. When you try and select these items, the focus seems to return to the text box - the cursor starts blinbking in the text box and the item in the list box won't select but the listbox continues to display on top.

The only way I've found so far of overcoming this problem is to turn off visibility in the underlying textboxes. However this makes for some very messy programming and the visual effect for the user is unsatifactory in that when he/she wishes to use the list box some of the text boxes would disappear from the screen.

I am trying to construct a multilevel menu - maybe there is some other way of doing this. I've also thought of putting the listboxes in a separate dialog in the hope that that dialog could be made to sit of top without being interfered with by items beneath, but I have tried this yet.

Dennis J.
Back to top
View user's profile Send private message
B Marcelly
Super User
Super User


Joined: 12 May 2004
Posts: 1453
Location: France

PostPosted: Wed Nov 19, 2008 6:30 am    Post subject: Reply with quote

Hi,
I don't have a solution to your problem.
But I think your dialog should be reworked using the step property. A multi-page dialog is the normal way of showing different displays in the same dialog.
See http://wiki.services.openoffice.org/wiki/Documentation/BASIC_Guide/Properties
______
Bernard
Back to top
View user's profile Send private message Visit poster's website
Dennis Jelavic
Power User
Power User


Joined: 13 Nov 2008
Posts: 67

PostPosted: Wed Nov 19, 2008 12:06 pm    Post subject: Reply with quote

Thanks again Bernard.

I have now tried putting the list boxes in separate dialogs and this works if I can find some way of not displaying the title bar on a dialog. I've turned this off in the IDE but it still displays.

Do you know of any way of making this not visible?

Dennis J.
Back to top
View user's profile Send private message
Dennis Jelavic
Power User
Power User


Joined: 13 Nov 2008
Posts: 67

PostPosted: Thu Dec 04, 2008 9:28 pm    Post subject: Reply with quote

If anyone is interested I finally got a list box that is situated on top of Edit Controls to behave properly. Simply create the list box programmatically instead of through the IDE
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group