| View previous topic :: View next topic |
| Author |
Message |
Marcelito Escort Newbie
Joined: 22 Jun 2004 Posts: 10
|
Posted: Mon Jun 28, 2004 1:15 pm Post subject: Element "Virtually" out of a dialog |
|
|
How can I do to place an element in a pos <0.
This is an example of what i´m trying to do:
| Code: |
DIALOG CREATE,New Dialog,-1,0,240,351
DIALOG ADD,LINE,LINE1,30,104,113,358
DIALOG ADD,BUTTON,up,42,18,64,24,,,up
DIALOG ADD,BUTTON,down,259,23,64,24,down
DIALOG SHOW
:menu
wait event
goto @event()
:close
Stop
:upbutton
dialog setpos,line1,@diff(@dlgpos(line1,T),10),104
goto menu
:downbutton
dialog setpos,line1,@sum(@dlgpos(line1,T),10),104
goto menu
|
When you push the down button LINE1 goes down and "virtually" out of the dialog. When you push the up button LINE1 goes up untill Top >0
How can i get the same effect? like with the down button...
Is it imposible to place an element in a pos -x?
Thanks a lot....
Post has been edited by Vic to make it use the [code:1:b0324d684e] tag |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Jun 28, 2004 1:46 pm Post subject: |
|
|
It's not possible using DIALOG SETPOS, because VDS treats a negative top or left position as null, in order that you can change the width or height without having to specify the top and left position.
There's probably an API way to do it... _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Mon Jun 28, 2004 2:52 pm Post subject: |
|
|
Jules, would WINDOW POSITION,~ELEMENT,-10,-10 work? _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Jun 28, 2004 3:01 pm Post subject: |
|
|
| Garrett wrote: | | Jules, would WINDOW POSITION,~ELEMENT,-10,-10 work? |
Garrett, wouldn't it be WINDOW POSITION,@winexists(~ELEMENT),-10,-10?  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Mon Jun 28, 2004 6:53 pm Post subject: |
|
|
| FreezingFire wrote: | | Garrett wrote: | | Jules, would WINDOW POSITION,~ELEMENT,-10,-10 work? |
Garrett, wouldn't it be WINDOW POSITION,@winexists(~ELEMENT),-10,-10?  |
Eeeee.... Yeah, that's what I meant  _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Tue Jun 29, 2004 12:37 pm Post subject: |
|
|
I dunno. WINDOW POSITION is basically a wrapper round an API call, so it might work, except that getting the handle of the dialog element you want to move isn't as simple as using @winexists().
@winexists() only gets you main windows. You would have to walk through the child windows to find the handle of the child you want, pretty much like the Window Spy does. The good news is that you only have to do this once, because once the element is created its handle will stay the same for the duration of the program. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
Marcelito Escort Newbie
Joined: 22 Jun 2004 Posts: 10
|
Posted: Tue Jun 29, 2004 5:27 pm Post subject: |
|
|
| and... how can i get the handle of an especific element in my dialog? |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Wed Jun 30, 2004 4:14 pm Post subject: |
|
|
| Marcelito Escort wrote: | | and... how can i get the handle of an especific element in my dialog? |
%%Handle = @winexists(~MyEditBox)
Just make sure you put the '~' char infront of the name of the element. This will work for most elements with the exception of the bitmap and text elements since these use the Win32 GDI api to bitblt and textout the bitmaps and text to the VDS dialog. In other words any VDS element that is a Windows control you will be able to get the Window handle for it. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Wed Jun 30, 2004 5:39 pm Post subject: |
|
|
Of course it does! For some reason, I was thinking about getting the handle of an element from another application. @winexists() can get the handle of an application's own elements (if they have one). Thanks for correcting my mistake. _________________ The Tech Pro
www.tech-pro.net |
|
| 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
|
|