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 


Using Kboard Tab to Navigate Tab Dialog Object

 
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: Sun Mar 23, 2003 5:09 pm    Post subject: Using Kboard Tab to Navigate Tab Dialog Object Reply with quote

Demonstrates how to use keyboard tab to navigate tab dialog object. Cannot have edits that accept the tab key with this script.

IMPORTANT
Line 13
Line 39
Line 297-319

Code:

option decimalsep,"."
option scale,96
option fieldsep,@chr(124)
%%tab = task

registry write,root,.tls\shell\Open\command,,@chr(34)%0@chr(34) @chr(34)"%1"@chr(34)

title Task List
  DIALOG CREATE,Task List,-1,0,506,386,resizable,savepos
  DIALOG ADD,STYLE,STYLE1,Comic Sans MS,12,,WHITE,FOREGROUND
  dialog add,status,status1
 
  rem IMPORTANT
dialog add,menu,-,Tab|Tab

  DIALOG ADD,MENU,&File,&New|CTRL+N,&Open|CTRL+O,&Save|CTRL+S,Save &As,-,&Exit
   dialog add,menu,&Edit,&Undo|CTRL+Z,-,Cu&t|CTRL+X,&Copy|CTRL+C,&Paste|CTRL+V,-,Select &All|CTRL+A
   dialog add,menu,&Help,&About
  DIALOG ADD,GROUP,GROUP2,0,168,3000,30
  DIALOG ADD,GROUP,GROUP1,0,-10,180,30
  DIALOG ADD,BUTTON,BUTTON1,4,2,22,22
  DIALOG ADD,BITBTN,BITBTN1,6,4,18,18,tasklist.dll|0,,New
  DIALOG ADD,BUTTON,BUTTON2,4,24,22,22,BUTTON2
  DIALOG ADD,BITBTN,BITBTN2,6,26,18,18,tasklist.dll|1247,,Open
  DIALOG ADD,BUTTON,BUTTON3,4,46,22,22,BUTTON3
  DIALOG ADD,BITBTN,BITBTN3,6,48,18,18,tasklist.dll|2500,,Save
  DIALOG ADD,BUTTON,BUTTON4,4,74,22,22,BUTTON4
  DIALOG ADD,BITBTN,BITBTN4,6,76,18,18,tasklist.dll|3797,,Cut
  DIALOG ADD,BUTTON,BUTTON5,4,96,22,22,BUTTON5
  DIALOG ADD,BITBTN,BITBTN5,6,98,18,18,tasklist.dll|5064,,Copy
  DIALOG ADD,BUTTON,BUTTON6,4,118,22,22,BUTTON6
  DIALOG ADD,BITBTN,BITBTN6,6,120,18,18,tasklist.dll|6335,,Paste
  DIALOG ADD,BUTTON,BUTTON7,4,140,22,22,BUTTON7
  DIALOG ADD,BITBTN,BITBTN7,6,142,18,18,tasklist.dll|7634,,Undo
  DIALOG ADD,LIST,LIST1,0,0,0,0
  DIALOG ADD,LIST,LIST2,0,0,0,0
 
rem IMPORTANT
  DIALOG ADD,TAB,TAB1,32,0,510,24,Task|Accomplished
 
  DIALOG ADD,EDIT,EDIT2,56,0,508,332,,scroll,multi,style1
  DIALOG ADD,EDIT,EDIT1,56,0,508,332,,scroll,multi,style1
  DIALOG ADD,list,list3,0,0,0,0
  DIALOG SHOW
 
  if %1
  %%filedlg = %1
  goto opencommandl
  end
 
  :EVLOOP
  if %%file
  dialog title,@name(%%file) - Task List
  dialog set,status1,@path(%%file)
  else
  dialog title,Task List
  end
wait event,0.1
  parse "%%event;%%dialog",@event(D)
  dialog select,%%dialog
goto %%event
 
:TIMER
dialog select,0
%%event =
rem gosub Mouseover Check
if @null(%%event)
%%event = evloop
end
goto %%event

:exitmenu
:close
%A = @sendmsg(@win(~EDIT1),$0B8,0,0)
%B = @sendmsg(@win(~EDIT2),$0B8,0,0)
if @not(@both(@zero(%A),@zero(%B)))
gosub asksave
else
end
exit

:RESIZE
parse "%%width;%%height",@dlgpos(,WH)
dialog setpos,edit1,56,0,%%width,@diff(%%height,76)
dialog setpos,edit2,56,0,%%width,@diff(%%height,76)
dialog setpos,tab1,32,0,%%width
goto evloop

  :cutmenu
  :button4button
  :bitbtn4button
  if @equal(%%tab,task)
  %a = @sendmsg(@win(~edit1),$300,0,0)
  else
  %a = @sendmsg(@win(~edit2),$300,0,0)
  end
  goto evloop
 
  :copymenu
  :button5button
  :bitbtn5button
  if @equal(%%tab,task)
  %a = @sendmsg(@win(~edit1),$0301,0,0)
  else
  %a = @sendmsg(@win(~edit2),$0301,0,0)
  end
  goto evloop

  :pastemenu
  :button6button
  :bitbtn6button
  if @equal(%%tab,task)
  %a = @sendmsg(@win(~edit1),$0302,0,0)
  else
  %a = @sendmsg(@win(~edit2),$0302,0,0)
  end
  goto evloop
 
    :undomenu
  :button7button
  :bitbtn7button
  if @equal(%%tab,task)
  %a = @sendmsg(@win(~edit1),$0304,0,0)
  else
    %a = @sendmsg(@win(~edit2),$0304,0,0)
   end
  goto evloop
 
  :select allmenu
   if @equal(%%tab,task)
  DIALOG FOCUS, Edit1
  %z = @sendmsg(@win(~edit1),$0B1,0,-1)
  else
  DIALOG FOCUS, Edit2
    %z = @sendmsg(@win(~edit2),$0B1,0,-1)
   end
  goto EVLOOP

:newmenu
:button1button
:bitbtn1button
%A = @sendmsg(@win(~EDIT1),$0B8,0,0)
%B = @sendmsg(@win(~EDIT2),$0B8,0,0)
if @not(@both(@zero(%A),@zero(%B)))
gosub asksave
else
end
%%file =
list clear,list1
list clear,list2
dialog clear,edit1
dialog clear,edit2
%A = @sendmsg(@win(~EDIT1),$0B9,0,0)
%B = @sendmsg(@win(~EDIT2),$0B9,0,0)
goto evloop

:asksave
%%ask = @ask(This file has been modified.  Would you like to save %%file?)
if @null(%%ask)
exit
else
end
if %%file
gosub savefile
exit
else
end
%%filedlg = @filedlg(Task List File|*.tls,,,Save)
if @null(%%filedlg)
gosub asksave
exit
else
end
if @null(@ext(%%filedlg))
%%filedlg = %%filedlg.tls
end
%%file = %%filedlg
gosub savefile
exit

:savemenu
:button3button
:bitbtn3button
if %%file
gosub savefile
goto evloop
else
end
goto save asmenu

:save asmenu
%%filedlg = @filedlg(Task List File|*.tls,,,Save)
if @null(%%filedlg)
goto evloop
else
end
if @null(@ext(%%filedlg))
%%filedlg = %%filedlg.tls
end
%%file = %%filedlg
gosub savefile
goto evloop

:savefile
dialog set,list1,@dlgtext(edit1)
dialog set,list2,@dlgtext(edit2)
if @text(list1)
%%list = list1
%%index = 0
%%count = @count(%%list)
repeat
list seek,%%list,%%index
list add,list3,@item(list1)
%%index = @succ(%%index)
until @equal(%%index,%%count)
end
list add,list3,<!--begin accomplished-->
if @text(list2)
%%list = list2
%%index = 0
%%count = @count(%%list)
repeat
list seek,%%list,%%index
list add,list3,@item(list2)
%%index = @succ(%%index)
until @equal(%%index,%%count)
list savefile,list3,%%file
end
%A = @sendmsg(@win(~EDIT1),$0B9,0,0)
%B = @sendmsg(@win(~EDIT2),$0B9,0,0)
exit

:openmenu
:button2button
:bitbtn2button
%A = @sendmsg(@win(~EDIT1),$0B8,0,0)
%B = @sendmsg(@win(~EDIT2),$0B8,0,0)
if @not(@both(@zero(%A),@zero(%B)))
gosub asksave
else
end
%%filedlg = @filedlg(Task List Files|*.tls)
if @null(%%filedlg)
goto evloop
else
end
:opencommandl
%%file = %%filedlg
list loadfile,list3,%%filedlg
if @text(list3)
list clear,list1
list clear,list2
%%changelist = false
%%list = list3
%%index = 0
%%count = @count(%%list)
repeat
list seek,%%list,%%index
if @equal(@item(list3),<!--begin accomplished-->)
%%changelist = true
else
if @equal(%%changelist,false)
list add,list1,@item(list3)
else
list add,list2,@item(list3)
end
end
%%index = @succ(%%index)
until @equal(%%index,%%count)
end
dialog set,edit1,@text(list1)
dialog set,edit2,@text(list2)
%A = @sendmsg(@win(~EDIT1),$0B9,0,0)
%B = @sendmsg(@win(~EDIT2),$0B9,0,0)
goto evloop

:taskclick
%%tab = task
dialog show,edit1
dialog hide,edit2
dialog focus,edit1
goto evloop

:accomplishedclick
%%tab = accomplished
dialog show,edit2
dialog hide,edit1
dialog focus,edit2
goto evloop

:aboutmenu
info Program by Brandon "NodNarb" Cunningham
goto evloop

rem IMPORTANT

:taskclick
%%tab = task
dialog show,edit1
dialog hide,edit2
dialog focus,edit1
goto evloop

:accomplishedclick
%%tab = accomplished
dialog show,edit2
dialog hide,edit1
dialog focus,edit2
goto evloop

:tabmenu
if @equal(%%tab,task)
dialog set,tab1,accomplished
goto accomplishedclick
else
dialog set,tab1,task
goto taskclick
end
goto evloop


NodNarb
Back to top
View user's profile Send private message AIM Address
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