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 


Ribbon Example

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


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Fri Apr 29, 2011 5:14 pm    Post subject: Ribbon Example Reply with quote

Barebones ribbon example. If I sendmessage a bitbtn (which I have to look up, can't remember how) to change it to a regular button will it retain it's style from a style dialog?

Button messages are not valid for files with Windows XP Manifest files. $0f4,$7 comes in handy for disabling a button without changing appearance but would become a group box in win95/win98/winme

To get the entire effects of a ribbon control you'd have to use a model similar to http://www.vdsworld.com/forum/viewtopic.php?p=36237 because they drop down over the main window with a sub-window and ride the control up creating an overlap effect. So there'd be another variance involved.

Personally, I find the third variance to be an absolute annoyance. Below is good enough.

Thanks,

cnodnarb

Code:
  DIALOG CREATE,New Dialog,-1,0,1314,376
REM *** Modified by Dialog Designer on 4/29/2011 - 11:02 ***
  DIALOG ADD,BUTTON,BUTTON0,0,0,0,0,hidden
  DIALOG ADD,BUTTON,BUTTON1,0,0,50,30,Home
  DIALOG ADD,bitbtn,bitbtn1,0,0,50,30,,Home
  DIALOG ADD,BUTTON,BUTTON2,0,51,50,30,Insert
  DIALOG ADD,bitbtn,bitbtn2,0,51,50,30,,Insert
  DIALOG ADD,BUTTON,BUTTON3,0,102,100,30,Page Layout
  DIALOG ADD,bitbtn,bitbtn3,0,102,100,30,,Page Layout
  DIALOG ADD,GROUP,GROUP1,26,0,1276,93
  dialog hide,bitbtn1
rem DIALOG ADD,BITMAP,BITMAP1,30,3,1251,84,#group1.bmp
  DIALOG ADD,GROUP,GROUP2,11125,0,1279,94
rem DIALOG ADD,BITMAP,BITMAP2,11128,0,1276,88,#group2.bmp
  DIALOG ADD,GROUP,GROUP3,11224,-1,1279,89
rem DIALOG ADD,BITMAP,BITMAP3,11226,0,1059,83,#group3.bmp
  dialog hide,group2
  dialog hide,group3
  dialog setpos,group2,26,0,1276,93
  dialog setpos,group3,26,0,1276,93
  dialog add,edit,edit1,120,0,1276,245,,,multi
  DIALOG SHOW
 
  %%show = show
  :evloop
  dialog focus,edit1
  wait event
  goto @event()
 
  :button0button
  :button1button
  dialog show,group1
  if @null(%%show)
  %%show = show
  else
  %%show = ""
  end
  goto buttons
   :button2button
   dialog show,group2
     if @null(%%show)
  %%show = show
  else
  %%show = ""
  end
     goto buttons
    :button3button
    dialog show,group3
      if @null(%%show)
  %%show = show
  else
  %%show = ""
  end
      goto buttons
   
    :buttons
  if @null(%%show)
  dialog hide,group1
  dialog hide,group2
  dialog hide,group3
  dialog show,bitbtn1
    dialog show,bitbtn2
      dialog show,bitbtn3
  dialog setpos,edit1,25,0,1276,340
  else
  dialog setpos,edit1,120,0,1276,245
  end
  goto evloop
 
 
  :close
  exit
 
  :bitbtn1button
  %%show = show
  dialog hide,bitbtn1
  dialog show,group1
  dialog hide,group2
  dialog hide,group3
  dialog show,bitbtn2
  dialog show,bitbtn3
  dialog setpos,edit1,120,0,1276,245
goto evloop

 :bitbtn2button
 %%show = show
    dialog show,bitbtn1
      dialog hide,group1
  dialog show,group2
  dialog hide,group3
  dialog hide,bitbtn2
  dialog show,bitbtn3
  dialog setpos,edit1,120,0,1276,245
goto evloop
 
 :bitbtn3button
 %%show = show
    dialog show,bitbtn1
      dialog hide,group1
  dialog hide,group2
  dialog show,group3
  dialog show,bitbtn2
  dialog hide,bitbtn3
  dialog setpos,edit1,120,0,1276,245
goto evloop
Back to top
View user's profile Send private message AIM Address
LiquidCode
Moderator Team


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

PostPosted: Mon Jun 08, 2015 8:27 pm    Post subject: Reply with quote

I cam across this b/c I wanted to use a ribbon for one of my apps.... I like the "overlay" style and this was easily adjusted to do just that! Smile

Here it is in use - http://prntscr.com/7ep1tt

Code:

  dialog CREATE,New Dialog,-1,0,1314,376
  rem *** Modified by Dialog Designer on 4/29/2011 - 11:02 ***
  dialog ADD,BUTTON,BUTTON0,0,0,0,0,hidden
  dialog ADD,BUTTON,button1,0,0,50,30,Home
  dialog ADD,bitbtn,bitbtn1,0,0,50,30,,Home
  dialog ADD,BUTTON,BUTTON2,0,51,50,30,Insert
  dialog ADD,bitbtn,bitbtn2,0,51,50,30,,Insert
  dialog ADD,BUTTON,BUTTON3,0,102,100,30,Page Layout
  dialog ADD,bitbtn,bitbtn3,0,102,100,30,,Page Layout
  dialog add,group,group0,24,0,1276,340
  dialog add,edit,edit1,25,1,1276,340,,,multi
  dialog ADD,GROUP,GROUP1,11025,-1,1276,93
  #dialog hide,bitbtn1
  rem DIALOG ADD,BITMAP,BITMAP1,30,3,1251,84,#group1.bmp
  dialog ADD,GROUP,GROUP2,11125,-1,1279,93
  rem DIALOG ADD,BITMAP,BITMAP2,11128,0,1276,88,#group2.bmp
  dialog ADD,GROUP,GROUP3,11224,-1,1279,93
  rem DIALOG ADD,BITMAP,BITMAP3,11226,0,1059,83,#group3.bmp
  dialog hide,group1
  dialog hide,group2
  dialog hide,group3
  dialog setpos,group1,25,0,1314,93
  dialog setpos,group2,25,0,1314,93
  dialog setpos,group3,25,0,1314,93

  dialog SHOW

  %%show =
:evloop
  #dialog focus,edit1
  wait event
  goto @event()

:button0button
:button1button
  dialog show,group1
  if @null(%%show)
    %%show = show
  else
    %%show =
  end
  goto buttons
:button2button
  dialog show,group2
  if @null(%%show)
    %%show = show
  else
    %%show =
  end
  goto buttons
:button3button
  dialog show,group3
  if @null(%%show)
    %%show = show
  else
    %%show =
  end
  goto buttons

:buttons
  if @null(%%show)
    dialog hide,group1
    dialog hide,group2
    dialog hide,group3
    dialog show,bitbtn1
    dialog show,bitbtn2
    dialog show,bitbtn3
    dialog setpos,edit1,25,0,1276,340
  else
    dialog setpos,edit1,25,0,1276,340
    #dialog setpos,edit1,120,0,1276,245
  end
  goto evloop

:close
  exit

:bitbtn1button
  %%show = show
  dialog hide,bitbtn1
  dialog show,group1
  dialog hide,group2
  dialog hide,group3
  dialog show,bitbtn2
  dialog show,bitbtn3
  dialog setpos,edit1,25,0,1276,340
  goto evloop

:bitbtn2button
  %%show = show
  dialog show,bitbtn1
  dialog hide,group1
  dialog show,group2
  dialog hide,group3
  dialog hide,bitbtn2
  dialog show,bitbtn3
  dialog setpos,edit1,25,0,1276,340
  goto evloop

:bitbtn3button
  %%show = show
  dialog show,bitbtn1
  dialog hide,group1
  dialog hide,group2
  dialog show,group3
  dialog show,bitbtn2
  dialog hide,bitbtn3
  dialog setpos,edit1,25,0,1276,340
  goto evloop

_________________
Chris
Http://theblindhouse.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 5 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