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 


Side Tab-Panel

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 3 Source Code
View previous topic :: View next topic  
Author Message
cnodnarb
Valued Contributor
Valued Contributor


Joined: 11 Sep 2002
Posts: 641
Location: Evansville, IN

PostPosted: Sat Dec 21, 2002 7:05 am    Post subject: Side Tab-Panel Reply with quote

Me and a friend are working on an extensive project together, and he sent me this image of a unique tab-panel where the buttons where greyed out when not selected and it also needed to be a side panel style. He also mentioned he may want to be able to change the colors of the button text according to certain things that may happen in the program...talk about a pain in the buttocks!

Here's what I wound up sending him back, requires vdswnd.dll.

This wound up looking almost exactly like the image prototype he made...so i'm pretty proud of it!

Code:

external vdswnd.dll
  DIALOG CREATE,Control Panel,-1,0,160,500,,notitle,class cpanel
rem  DIALOG CREATE,Control Panel,-1,0,160,500,,smallcap,class cpanel
rem  wnd shape,#cpanel,roundrect,18,0,160,500,0
  dialog add,button,close,475,0,150,25,CLOSE HERE
  dialog add,style,style2,Comic Sans MS,12,b,black,white
  DIALOG ADD,STYLE,STYLE1,Tempus Sans ITC,12,BC,BACKGROUND,Gray
  dialog add,text,bg,0,0,4000,4000,,,style2
  DIALOG ADD,BUTTON,BUTTON1,0,5,150,25,What,,,STYLE1

  DIALOG ADD,GROUP,GROUP1,3,8,144,19
  Dialog add,text,text1,3,8,144,19,What,,Style1,click
 
  DIALOG ADD,BUTTON,BUTTON2,25,5,150,25,Do,,,STYLE1

  DIALOG ADD,GROUP,GROUP2,28,8,144,19
  Dialog add,text,text2,28,8,144,19,Do,,Style1,click
 
  DIALOG ADD,BUTTON,BUTTON3,50,5,150,25,You,,,STYLE1
 
    DIALOG ADD,GROUP,GROUP3,53,8,144,19
  Dialog add,text,text3,53,8,144,19,You,,Style1,click
 
  DIALOG ADD,BUTTON,BUTTON4,75,5,150,25,Think?,,,STYLE1
 
  DIALOG ADD,GROUP,GROUP4,78,8,144,19
  Dialog add,text,text4,78,8,144,19,Think?,,Style1,click
 
  DIALOG ADD,BUTTON,BUTTON5,100,5,150,25," ",,,STYLE1
 
  DIALOG ADD,GROUP,GROUP5,103,8,144,19
  Dialog add,text,text5,103,8,144,19," ",,Style1,click
 
  DIALOG ADD,BUTTON,BUTTON6,125,5,150,25,Will,,,STYLE1
 
  DIALOG ADD,GROUP,GROUP6,128,8,144,19
  Dialog add,text,text6,128,8,144,19,Will,,Style1,click
 
  DIALOG ADD,BUTTON,BUTTON7,150,5,150,25,This,,,STYLE1
 
   DIALOG ADD,GROUP,GROUP7,153,8,144,19
  Dialog add,text,text7,153,8,144,19,This,,Style1,click
 
  DIALOG ADD,BUTTON,BUTTON8,175,5,150,25,Be,,,STYLE1
 
  DIALOG ADD,GROUP,GROUP8,178,8,144,19
  Dialog add,text,text8,178,8,144,19,Be,,Style1,click
 
  DIALOG ADD,BUTTON,BUTTON9,200,5,150,25,OK?,,,STYLE1
 
  DIALOG ADD,GROUP,GROUP9,203,8,144,19
  Dialog add,text,text9,203,8,144,19,OK?,,Style1,click
 
  DIALOG ADD,BUTTON,BUTTON10,225,5,150,25," ",,,STYLE1
 
  DIALOG ADD,GROUP,GROUP10,228,8,144,19
  Dialog add,text,text10,228,8,144,19," ",,Style1,click
 
  DIALOG ADD,BUTTON,BUTTON11,250,5,150,25,Suggestions?,,,STYLE1
 
  DIALOG ADD,GROUP,GROUP11,253,8,144,19
  Dialog add,text,text11,253,8,144,19,Suggestions?,,Style1,click
 
  DIALOG ADD,BUTTON,BUTTON12,275,5,150,25,Comments?,,,STYLE1
 
  DIALOG ADD,GROUP,GROUP12,278,8,144,19
  Dialog add,text,text12,278,8,144,19,Comments?,,Style1,click
 
  DIALOG ADD,BUTTON,BUTTON13,300,5,150,25,Tab 13,,,STYLE1
 
  DIALOG ADD,GROUP,GROUP13,303,8,144,19
  Dialog add,text,text13,303,8,144,19,Tab 13,,Style1,click
 
  DIALOG ADD,BUTTON,BUTTON14,325,5,150,25,Tab 14,,,STYLE1
 
  DIALOG ADD,GROUP,GROUP14,328,8,144,19
  Dialog add,text,text14,328,8,144,19,Tab 14,,Style1,click
 
  DIALOG ADD,BUTTON,BUTTON15,350,5,150,25,Tab 15,,,STYLE1
 
   DIALOG ADD,GROUP,GROUP15,353,8,144,19
  Dialog add,text,text15,353,8,144,19,Tab 15,,Style1,click
 
  DIALOG ADD,BUTTON,BUTTON0,0,2,5,375," "
  DIALOG ADD,BITBTN,BITBTN1,1,4,5,22
  DIALOG ADD,BITBTN,BITBTN2,26,4,5,22
  DIALOG ADD,BITBTN,BITBTN3,51,4,5,22
  DIALOG ADD,BITBTN,BITBTN4,76,4,5,22
  DIALOG ADD,BITBTN,BITBTN5,101,4,5,22
  DIALOG ADD,BITBTN,BITBTN6,126,4,5,22
  DIALOG ADD,BITBTN,BITBTN7,151,4,5,22
  DIALOG ADD,BITBTN,BITBTN8,176,4,5,22
  DIALOG ADD,BITBTN,BITBTN9,201,4,5,22
  DIALOG ADD,BITBTN,BITBTN10,226,4,5,22
  DIALOG ADD,BITBTN,BITBTN11,251,4,5,22
  DIALOG ADD,BITBTN,BITBTN12,276,4,5,22
  DIALOG ADD,BITBTN,BITBTN13,301,4,5,22
  DIALOG ADD,BITBTN,BITBTN14,326,4,5,22
  DIALOG ADD,BITBTN,BITBTN15,351,4,5,22
  DIALOG ADD,EDIT,EDIT1,376,2,150,100,,multi,scroll,wrap
  dialog set,edit1,Available colors we can add easily (others available"," so if you've got a taste for pink"," your the boss.): "BLACK, DKRED, DKGREEN, BROWN, DKBLUE, MAGENTA, GRAY, SILVER, RED, LTGREEN, YELLOW, LTBLUE, CYAN, WHITE.  We can fully control colors displayed for what window is active etc. etc. even though this example doesn't clearly display that.  "Don't think I just throw these things together!  3 hours of work your looking at by golly!  288 lines of code! (Don't worry"," used a mimick tool for most of it!) One question...how do you want them to be able to move this window w/o a top toolbar?
wnd shape,@winexists(~button1),roundrect,0,0,148,25
wnd shape,@winexists(~button2),roundrect,0,0,148,25
wnd shape,@winexists(~button3),roundrect,0,0,148,25
wnd shape,@winexists(~button4),roundrect,0,0,148,25
wnd shape,@winexists(~button5),roundrect,0,0,148,25
wnd shape,@winexists(~button6),roundrect,0,0,148,25
wnd shape,@winexists(~button7),roundrect,0,0,148,25
wnd shape,@winexists(~button8),roundrect,0,0,148,25
wnd shape,@winexists(~button9),roundrect,0,0,148,25
wnd shape,@winexists(~button10),roundrect,0,0,148,25
wnd shape,@winexists(~button11),roundrect,0,0,148,25
wnd shape,@winexists(~button12),roundrect,0,0,148,25
wnd shape,@winexists(~button13),roundrect,0,0,148,25
wnd shape,@winexists(~button14),roundrect,0,0,148,25
wnd shape,@winexists(~button15),roundrect,0,0,148,25
  dialog disable,bitbtn1
  dialog disable,bitbtn2
  dialog disable,bitbtn3
  dialog disable,bitbtn4
  dialog disable,bitbtn5
  dialog disable,bitbtn6
  dialog disable,bitbtn7
  dialog disable,bitbtn8
  dialog disable,bitbtn9
  dialog disable,bitbtn10
  dialog disable,bitbtn11
  dialog disable,bitbtn12
  dialog disable,bitbtn13
  dialog disable,bitbtn14
  dialog disable,bitbtn15
dialog disable,button0
  DIALOG SHOW

  DIALOG ADD,LIST,LIST1,0,0,0,0
%%num = 1
gosub hidebtns
 
  :evloop
  wait event
  goto @event()
 
  :close
  exit
 
:button1button
:text1click
%%num = "1"
gosub hidebtns
dialog focus,button1
goto evloop

:button2button
:text2click
%%num = "2"
gosub hidebtns
dialog focus,button2
goto evloop

:button3button
:text3click
%%num = "3"
gosub hidebtns
dialog focus,button3
goto evloop

:button4button
:text4click
%%num = "4"
gosub hidebtns
dialog focus,button4
goto evloop

:button5button
:text5click
%%num = "5"
gosub hidebtns
dialog focus,button5
goto evloop

:button6button
:text6click
%%num = "6"
gosub hidebtns
dialog focus,button6
goto evloop

:button7button
:text7click
%%num = "7"
gosub hidebtns
dialog focus,button7
goto evloop

:button8button
:text8click
%%num = "8"
gosub hidebtns
dialog focus,button8
goto evloop

:button9button
:text9click
%%num = "9"
gosub hidebtns
dialog focus,button9
goto evloop

:button10button
:text10click
%%num = "10"
gosub hidebtns
dialog focus,button10
goto evloop

:button11button
:text11click
%%num = "11"
gosub hidebtns
dialog focus,button11
goto evloop

:button12button
:text12click
%%num = "12"
gosub hidebtns
dialog focus,button12
goto evloop

:button13button
:text13click
%%num = "13"
gosub hidebtns
dialog focus,button13
goto evloop

:button14button
:text14click
%%num = "14"
gosub hidebtns
dialog focus,button14
goto evloop

:button15button
:text15click
%%num = "15"
gosub hidebtns
dialog focus,button15
goto evloop

  :hidebtns
dialog show,group1
dialog show,group2
dialog show,group3
dialog show,group4
dialog show,group5
dialog show,group6
dialog show,group7
dialog show,group8
dialog show,group9
dialog show,group10
dialog show,group11
dialog show,group12
dialog show,group13
dialog show,group14
dialog show,group15
dialog hide,bitbtn1
dialog hide,bitbtn2
dialog hide,bitbtn3
dialog hide,bitbtn4
dialog hide,bitbtn5
dialog hide,bitbtn6
dialog hide,bitbtn7
dialog hide,bitbtn8
dialog hide,bitbtn9
dialog hide,bitbtn10
dialog hide,bitbtn11
dialog hide,bitbtn12
dialog hide,bitbtn13
dialog hide,bitbtn14
dialog hide,bitbtn15
dialog show,bitbtn%%num
dialog hide,group%%num
rem  dialog focus,list1
  exit
 
  :closebutton
  :close
  exit


Thank you Tommy for your wonderful work in extensions to the VDS language BTW! Very Happy

NodNarb
Back to top
View user's profile Send private message AIM Address
Tsunami1988
Contributor
Contributor


Joined: 15 Aug 2002
Posts: 70
Location: The Netherlands

PostPosted: Mon Dec 30, 2002 11:33 am    Post subject: Reply with quote

Replace this:

Code:
DIALOG ADD,BITBTN,BITBTN1,1,4,5,22
DIALOG ADD,BITBTN,BITBTN2,26,4,5,22
DIALOG ADD,BITBTN,BITBTN3,51,4,5,22
DIALOG ADD,BITBTN,BITBTN4,76,4,5,22
DIALOG ADD,BITBTN,BITBTN5,101,4,5,22
DIALOG ADD,BITBTN,BITBTN6,126,4,5,22
DIALOG ADD,BITBTN,BITBTN7,151,4,5,22
DIALOG ADD,BITBTN,BITBTN8,176,4,5,22
DIALOG ADD,BITBTN,BITBTN9,201,4,5,22
DIALOG ADD,BITBTN,BITBTN10,226,4,5,22
DIALOG ADD,BITBTN,BITBTN11,251,4,5,22
DIALOG ADD,BITBTN,BITBTN12,276,4,5,22
DIALOG ADD,BITBTN,BITBTN13,301,4,5,22
DIALOG ADD,BITBTN,BITBTN14,326,4,5,22
DIALOG ADD,BITBTN,BITBTN15,351,4,5,22


with this:

Code:
%S = 1
%T = 1
REPEAT
  DIALOG ADD,BITBTN,BITBTN%S,%T,4,5,22
  %S = @SUCC(%S)
  %T = @SUM(%T,25)
UNTIL @EQUAL(%S,15)


and this:

Code:
wnd shape,@winexists(~button1),roundrect,0,0,148,25
wnd shape,@winexists(~button2),roundrect,0,0,148,25
wnd shape,@winexists(~button3),roundrect,0,0,148,25
wnd shape,@winexists(~button4),roundrect,0,0,148,25
wnd shape,@winexists(~button5),roundrect,0,0,148,25
wnd shape,@winexists(~button6),roundrect,0,0,148,25
wnd shape,@winexists(~button7),roundrect,0,0,148,25
wnd shape,@winexists(~button8),roundrect,0,0,148,25
wnd shape,@winexists(~button9),roundrect,0,0,148,25
wnd shape,@winexists(~button10),roundrect,0,0,148,25
wnd shape,@winexists(~button11),roundrect,0,0,148,25
wnd shape,@winexists(~button12),roundrect,0,0,148,25
wnd shape,@winexists(~button13),roundrect,0,0,148,25
wnd shape,@winexists(~button14),roundrect,0,0,148,25
wnd shape,@winexists(~button15),roundrect,0,0,148,25
  dialog disable,bitbtn1
  dialog disable,bitbtn2
  dialog disable,bitbtn3
  dialog disable,bitbtn4
  dialog disable,bitbtn5
  dialog disable,bitbtn6
  dialog disable,bitbtn7
  dialog disable,bitbtn8
  dialog disable,bitbtn9
  dialog disable,bitbtn10
  dialog disable,bitbtn11
  dialog disable,bitbtn12
  dialog disable,bitbtn13
  dialog disable,bitbtn14
  dialog disable,bitbtn15
dialog disable,button0
  DIALOG SHOW


with this:

Code:
%S = 0
REPEAT
  %S = @SUCC(%S)
  WND SHAPE,@WINEXISTS(~BUTTON%S),ROUNDRECT,0,0,148,25
  DIALOG DISABLE,BITBTN%S
UNTIL @EQUAL(%S,15)
  DIALOG DISABLE,BUTTON0
  DIALOG SHOW


and this:

Code:
:hidebtns
dialog show,group1
dialog show,group2
dialog show,group3
dialog show,group4
dialog show,group5
dialog show,group6
dialog show,group7
dialog show,group8
dialog show,group9
dialog show,group10
dialog show,group11
dialog show,group12
dialog show,group13
dialog show,group14
dialog show,group15
dialog hide,bitbtn1
dialog hide,bitbtn2
dialog hide,bitbtn3
dialog hide,bitbtn4
dialog hide,bitbtn5
dialog hide,bitbtn6
dialog hide,bitbtn7
dialog hide,bitbtn8
dialog hide,bitbtn9
dialog hide,bitbtn10
dialog hide,bitbtn11
dialog hide,bitbtn12
dialog hide,bitbtn13
dialog hide,bitbtn14
dialog hide,bitbtn15
dialog show,bitbtn%%num
dialog hide,group%%num
rem  dialog focus,list1
  exit


with this:

Code:
:HIDEBTNS
%S = 0
REPEAT
  %S = @SUCC(%S)
  DIALOG SHOW,GROUP%S
  DIALOG HIDE,BITBTN%S
UNTIL @EQUAL(%S,15)
  DIALOG SHOW,BITBTN%%Num
  DIALOG HIDE,GROUP%%Num
    EXIT


This would save you a lot of lines Very Happy (57 to be exact Smile)
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 3 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