| View previous topic :: View next topic |
| Author |
Message |
uvedese Contributor


Joined: 21 Jan 2006 Posts: 169 Location: Spain
|
Posted: Wed Aug 22, 2007 2:43 pm Post subject: To change order of dialog elements |
|
|
Hi
Is there a way of changing the order of dialog elements while an application is executed? An example, it's not the same thing:
| Code: | DIALOG CREATE,Test1,-1,0,240,160
DIALOG ADD,SHAPE,back,39,37,50,25,FF8040,BLACK,,RECTANGLE
DIALOG ADD,TEXT,hello,44,48,,,hello
DIALOG SHOW |
like this:
| Code: | DIALOG CREATE,Test2,-1,0,240,160
DIALOG ADD,TEXT,hello,44,48,,,hello
DIALOG ADD,SHAPE,back,39,37,50,25,FF8040,BLACK,,RECTANGLE
DIALOG SHOW |
Using API?
Thanks in advance
______________
uVeDeSe |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Wed Aug 22, 2007 5:06 pm Post subject: |
|
|
uVeDeSe,
Why would you want to do that? _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Wed Aug 22, 2007 5:10 pm Post subject: |
|
|
uVeDeSe,
Wouldn't it be the same as doing a DIALOG HIDE on the TEXT element?
| Code: |
DIALOG CREATE,Test1,-1,0,240,160
DIALOG ADD,SHAPE,back,39,37,50,25,FF8040,BLACK,,RECTANGLE
DIALOG ADD,TEXT,hello,44,48,,,hello
DIALOG SHOW
DIALOG HIDE,hello
wait 5
DIALOG SHOW,hello
|
_________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
uvedese Contributor


Joined: 21 Jan 2006 Posts: 169 Location: Spain
|
Posted: Wed Aug 22, 2007 6:21 pm Post subject: |
|
|
dragonsphere,
el problema es más difícil de resolver:
Si tengo un formulario de una base de datos, los elementos EDIT (campos de registros) deben estar en un orden, de manera que usando la tecla TAB pasemos de un campo a otro.
Si quiero cambiar el estilo (fuente, tamaño de fuente,...) de un elemento EDIT tengo que eliminarlo y crearlo de nuevo cambiando, por tanto, el orden anterior.
-----------oo---------
dragonsphere,
the problem that I raise is more difficult to resolve:
If I have a form of a database, the EDIT elements (fields of reg) must be in an order, in order that using the TAB key let's be able happen from one field to other one.
If I want to change the STYLE (font, size font...) of an EDIT element I have to remove it and to create it again, altering then the previous order |
|
| Back to top |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Thu Aug 23, 2007 8:48 am Post subject: |
|
|
What about:
| Code: | DIALOG CREATE,Test1,-1,0,240,160
DIALOG ADD,SHAPE,back1,39,37,50,25,FF8040,BLACK,,RECTANGLE
DIALOG ADD,TEXT,hello1,44,48,22,13,hello
DIALOG ADD,LINE,LINE1,0,0,240,160
DIALOG ADD,TEXT,hello2,44,48,22,13,hello
DIALOG ADD,SHAPE,back3,39,37,50,25,FF8040,BLACK,,RECTANGLE
DIALOG SHOW
|
And then show and hide line1 as needed. _________________ cheers
Dave |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Aug 23, 2007 4:33 pm Post subject: |
|
|
| uvedese wrote: | dragonsphere,
el problema es más difícil de resolver:
Si tengo un formulario de una base de datos, los elementos EDIT (campos de registros) deben estar en un orden, de manera que usando la tecla TAB pasemos de un campo a otro.
Si quiero cambiar el estilo (fuente, tamaño de fuente,...) de un elemento EDIT tengo que eliminarlo y crearlo de nuevo cambiando, por tanto, el orden anterior.
-----------oo---------
dragonsphere,
the problem that I raise is more difficult to resolve:
If I have a form of a database, the EDIT elements (fields of reg) must be in an order, in order that using the TAB key let's be able happen from one field to other one.
If I want to change the STYLE (font, size font...) of an EDIT element I have to remove it and to create it again, altering then the previous order |
Yeah I figured that might be the problem you were having but because you used elements other than the Edit element I was not sure what you were trying to do. To be honest with you I have no clue how VDS handles the TAB order. If the VDS Dialog is a regular window and does not do anything outside of the primary message loop you technically should be able to use the SetWindowPos Win32 API to change the Z-Order of each of the elements on the VDS Dialog. However I believe each of the elements would need to have the WS_TABSTOP window style applied to them before SetWindowPos would work? Maybe Jules can give us more information about how TAB orders work with the VDS dialog? Here is a link to the documentation for this API call http://msdn2.microsoft.com/en-us/library/ms633545.aspx
I have not tried this API to change the Z-Order of VDS dialog elements but I have used it to change the Z-Order of Top level windows and it works to make your VDS dialog Top Most over all other windows open on the desktop.
If I get a chance I will try and test this API function on VDS dialog elements. Using the API function will only work on VDS dialog elements that have a window handle. VDS Text and Bitmap elements would not work since they are not a Windows control and are painted directly on the VDS dialog. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Aug 23, 2007 6:58 pm Post subject: |
|
|
Ok I tried the SetWindowPos API and it does not change the Z-Order of the VDS elements. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Aug 23, 2007 9:00 pm Post subject: |
|
|
At least it seems that all the elements do have the WS_TABSTOP window style but why the dialog does not pay attention to the Z-Order I do not know? _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
uvedese Contributor


Joined: 21 Jan 2006 Posts: 169 Location: Spain
|
Posted: Mon Aug 27, 2007 8:46 am Post subject: |
|
|
Thank you very much, dragonsphere.
Ok, There is no way easy to do it. I will continue trying, if I can, WS_TABSTOP window style.
A bad solution stay to remove all elements and re-create it in a good order
________
uVeDeSe
________
visit uVeDeSe website: http://www.uvedese.es |
|
| Back to top |
|
 |
|
|
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 You can attach files in this forum You can download files in this forum
|
|