| View previous topic :: View next topic |
| Author |
Message |
Dennis Jelavic Power User

Joined: 13 Nov 2008 Posts: 67
|
Posted: Mon Nov 17, 2008 4:02 pm Post subject: Bring control ToFront in dialog |
|
|
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 |
|
 |
B Marcelly Super User

Joined: 12 May 2004 Posts: 1414 Location: France
|
Posted: Tue Nov 18, 2008 1:07 am Post subject: Re: Bring control ToFront in dialog |
|
|
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 |
|
 |
Dennis Jelavic Power User

Joined: 13 Nov 2008 Posts: 67
|
Posted: Tue Nov 18, 2008 1:54 pm Post subject: |
|
|
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 |
|
 |
B Marcelly Super User

Joined: 12 May 2004 Posts: 1414 Location: France
|
|
| Back to top |
|
 |
Dennis Jelavic Power User

Joined: 13 Nov 2008 Posts: 67
|
Posted: Wed Nov 19, 2008 12:06 pm Post subject: |
|
|
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 |
|
 |
Dennis Jelavic Power User

Joined: 13 Nov 2008 Posts: 67
|
Posted: Thu Dec 04, 2008 9:28 pm Post subject: |
|
|
| 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 |
|
 |
|