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 


Checkbox List

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Aug 23, 2002 6:52 pm    Post subject: Checkbox List Reply with quote

Code:
  rem [ Nice-looking workaround for a checkbox list ]
  DIALOG CREATE,CheckList Dialog,-1,0,265,171
  DIALOG ADD,LIST,LIST1,2,2,260,166
  list add,list1,"     "CheckList Item 1
  DIALOG ADD,CHECK,CHECK1,4,4,14,14
  list add,list1,"     "CheckList Item 2
  DIALOG ADD,CHECK,CHECK2,18,4,14,14
  DIALOG SHOW
  :evloop
  wait event
  goto @event()
  :close
  if @dlgtext(check1)
  warn CHECK1 was checked
  end
  if @dlgtext(check2)
  warn CHECK2 was checked
  end
  exit

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


Joined: 05 Dec 2000
Posts: 1731
Location: Space and Time

PostPosted: Fri Aug 23, 2002 7:04 pm    Post subject: Reply with quote

Here is a little mod of that code so when the list
is clicked it will check the box as well. Wink
I had to add that. Laughing Wink

Code:

  rem [ Nice-looking workaround for a checkbox list ]
  rem by FreezingFire
  rem Modified by LiquidCode
  DIALOG CREATE,CheckList Dialog,-1,0,265,171
  DIALOG ADD,LIST,LIST1,2,2,260,166,,CLICK
  list add,list1,"     "CheckList Item 1
  DIALOG ADD,CHECK,CHECK0,4,4,14,14,
  list add,list1,"     "CheckList Item 2
  DIALOG ADD,CHECK,CHECK1,18,4,14,14,
  DIALOG SHOW
  :evloop
  wait event
  goto @event()
:LIST1CLICK
%N = @index(list1)
  if @dlgtext(check%n)
      dialog clear,check%n
  else
      dialog set,check%n,1
  end
goto evloop

  :close
  if @dlgtext(check0)
      warn CHECK0 was checked
  end
  if @dlgtext(check1)
      warn CHECK1 was checked
  end
  stop

_________________
Chris
Http://vdsfreak.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Aug 23, 2002 7:11 pm    Post subject: Reply with quote

Looks good, Exclamation but the VDS tag cut down the spacing which was needed to keep the text from going behind the checkbox...below is the proper spacing.

Code:
list add,list1,"     "CheckList Item 1
list add,list1,"     "CheckList Item 2

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


Joined: 05 Dec 2000
Posts: 1731
Location: Space and Time

PostPosted: Fri Aug 23, 2002 7:13 pm    Post subject: Reply with quote

Oops... Embarassed Laughing
_________________
Chris
Http://vdsfreak.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code 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