forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


DESIGN Style

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Jul 24, 2002 9:21 pm    Post subject: DESIGN Style Reply with quote

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
View user's profile Send private message Visit poster's website
LOBO
Valued Contributor
Valued Contributor


Joined: 14 Mar 2002
Posts: 241
Location: Wilmington, Delaware, USA

PostPosted: Wed Jul 24, 2002 11:24 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Jul 24, 2002 11:37 pm    Post subject: Reply with quote

Thanks, Lobo, I hadn't thought of :delete, but I tried combinations of like :b1delete and stuff...

Thanks again... Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Thu Jul 25, 2002 1:06 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Thu Jul 25, 2002 1:55 am    Post subject: Reply with quote

Ya, in complex multi-dialog VDS programs,
%%event = @event()
info %%Event
goto %%Event
is a major headache saver!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Thu Jul 25, 2002 11:37 am    Post subject: Reply with quote

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
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Thu Jul 25, 2002 11:42 am    Post subject: Reply with quote

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
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Jul 25, 2002 12:42 pm    Post subject: Reply with quote

Thanks for your replies...they were a big help. Very Happy
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Jul 25, 2002 5:00 pm    Post subject: Reply with quote

Hey LOBO, Smile

Thanks for the DESIGN style DELETE label info. I added
it to the VDS3 source code post:

http://www.vdsworld.com/forum/viewtopic.php?t=45

Anybody have any other DESIGN style info?

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Thu Jul 25, 2002 6:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Jul 25, 2002 6:23 pm    Post subject: Reply with quote

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. Wink

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
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
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group