| View previous topic :: View next topic |
| Author |
Message |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Jul 24, 2002 9:21 pm Post subject: DESIGN Style |
|
|
Does anyone know the event label for the "delete" event in the DESIGN style? If you select the button, then press delete, it generates a "label not found" error. Try it with the source below:
| Code: |
rem -- VDS3 & VDS4 compatible --
rem -- Move elements using the undocumented DESIGN style --
OPTION SCALE, 96
Title By Mac
DIALOG CREATE,Design Style,-1,0,300,200,DESIGN,CLICK
DIALOG ADD,BUTTON,B1,5,5,60,20,"Button"
DIALOG SHOW
:CLICK
:EVLOOP
WAIT EVENT
goto @event()
:B1CLICK
DIALOG ATTACH, B1
:B1CHANGE
goto EVLOOP
:CLOSE
EXIT
|
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
LOBO Valued Contributor


Joined: 14 Mar 2002 Posts: 241 Location: Wilmington, Delaware, USA
|
Posted: Wed Jul 24, 2002 11:24 pm Post subject: |
|
|
FreezingFire
The label is :DELETE
I added it into the example you used. See below and try it out.
| Code: |
rem -- VDS3 & VDS4 compatible --
rem -- Move elements using the undocumented DESIGN style --
option SCALE, 96
title By Mac
dialog CREATE,Design Style,-1,0,300,200,DESIGN,CLICK
dialog ADD,BUTTON,B1,5,5,60,20,"Button"
dialog SHOW
:CLICK
:EVLOOP
wait EVENT
goto @event()
:B1CLICK
dialog ATTACH, B1
:B1CHANGE
goto EVLOOP
:DELETE
info The delete key was pressed
goto evloop
:CLOSE
exit
|
|
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Jul 24, 2002 11:37 pm Post subject: |
|
|
Thanks, Lobo, I hadn't thought of :delete, but I tried combinations of like :b1delete and stuff...
Thanks again...  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Thu Jul 25, 2002 1:06 am Post subject: |
|
|
Also you can add:
| Code: |
%%Event = @event()
info %%Event
goto %%Event
|
Into your :evloop label to see what labels are being called.
| Code: |
rem -- VDS3 & VDS4 compatible --
rem -- Move elements using the undocumented DESIGN style --
option SCALE, 96
title By Mac
dialog CREATE,Design Style,-1,0,300,200,DESIGN,CLICK
dialog ADD,BUTTON,B1,5,5,60,20,"Button"
dialog SHOW
:CLICK
:Delete
:EVLOOP
wait EVENT
%%Event = @event()
info %%Event
goto %%Event
:B1CLICK
dialog ATTACH, B1
:B1CHANGE
goto EVLOOP
:CLOSE
exit
|
_________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
MarkTrubo Contributor


Joined: 27 May 2001 Posts: 148 Location: Long Island, NY
|
Posted: Thu Jul 25, 2002 1:55 am Post subject: |
|
|
Ya, in complex multi-dialog VDS programs,
%%event = @event()
info %%Event
goto %%Event
is a major headache saver! |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Thu Jul 25, 2002 11:37 am Post subject: |
|
|
If you place a info, then sometimes you've to click a hundred times till you get the event you want.
You can better double click on %%event, so it's added to the debug window... |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Thu Jul 25, 2002 11:42 am Post subject: |
|
|
| Btw, you can also start your program in DEBUG (the button right to the START-button) mode, then the event will be returned in the status-bar of the VDS main window... |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Jul 25, 2002 12:42 pm Post subject: |
|
|
Thanks for your replies...they were a big help.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Thu Jul 25, 2002 6:14 pm Post subject: |
|
|
I don't know a new label, but did you know there is a dialog remove??? The online help of VDS 3.51 isn't talking about it, but search for REMOVE... It says:
| Quote: | Note: MENUs are not implemented in the same way as other dialog elements. The SET, CLEAR, HIDE, SHOW, ENABLE, DISABLE and REMOVE verbs don't work with them. Once a menu is added to a dialog it is fixed.
Copyright 1995 - 2000 S.A.D.E. s.a.r.l. / All rights are reserved. |
The usage is:
DIALOG REMOVE,Controlname
Ps. If you use dialog create, with the style RESIZABLE you can also use RESIZ |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Jul 25, 2002 6:23 pm Post subject: |
|
|
I think there's several code examples posted that use
DIALOG REMOVE. But many of us didn't know about
it until someone (I forget who?) posted it.
And about the "RESIZ" command... You can abbreviate
any command as long as the abbreviation is unique to
the command you want.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| 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
|
|