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 


resizing help need

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed Feb 04, 2004 5:16 am    Post subject: resizing help need Reply with quote

hello all

I have gotten myself in a mess now Crying or Very sad how do i make this example resize right... meaning i want list1 and list2 to resize right i have buttons in the middle Sad i have played with the DIALOG SETPOS command for hours and i can't get it to look right any help would be great

thanks

here is example of my layout

Code:

DIALOG CREATE,New Dialog,-1,0,575,339
REM *** Modified by Dialog Designer on 2/3/2004 - 23:04 ***
  DIALOG ADD,LIST,LIST1,70,26,190,154
  DIALOG ADD,PROGRESS,PROGRESS1,282,46,498,24,0
  DIALOG ADD,LIST,LIST2,72,308,204,144
  DIALOG ADD,BUTTON,BUTTON1,74,226,64,26,BUTTON1
  DIALOG ADD,BUTTON,BUTTON2,112,226,64,24,BUTTON2
  DIALOG ADD,BUTTON,BUTTON3,148,226,64,24,BUTTON3
  DIALOG ADD,EDIT,EDIT1,16,30,180,19,EDIT1
  DIALOG ADD,EDIT,EDIT2,44,30,180,19,EDIT2
  DIALOG SHOW

:EVLOOP
  WAIT EVENT
  goto @event()
 
  :close
  exit
 

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Wed Feb 04, 2004 7:55 am    Post subject: Reply with quote

something like this?

Code:
  DIALOG CREATE,New Dialog,-1,0,556,331
REM *** Modified by Dialog Designer on 2/4/04 - 18:53 ***
  DIALOG ADD,LIST,LIST1,70,26,184,154
  DIALOG ADD,PROGRESS,PROGRESS1,280,26,466,24,0
  DIALOG ADD,LIST,LIST2,72,308,184,154
  DIALOG ADD,BUTTON,BUTTON1,74,226,64,26,BUTTON1
  DIALOG ADD,BUTTON,BUTTON2,112,226,64,24,BUTTON2
  DIALOG ADD,BUTTON,BUTTON3,148,226,64,24,BUTTON3
  DIALOG ADD,EDIT,EDIT1,16,30,180,19,EDIT1
  DIALOG ADD,EDIT,EDIT2,44,30,180,19,EDIT2
  DIALOG SHOW

:EVLOOP
  WAIT EVENT
  goto @event()
 
:button1button
  dialog setpos, list1, 70,26,200,200
  dialog setpos, button1,74,236,64,26
  dialog setpos, button2,112,236,64,24
  dialog setpos, button3,148,236,64,24
  dialog setpos, list2, 72,318,200,200
  goto evloop
 
  :close
  exit


serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Mac
Professional Member
Professional Member


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

PostPosted: Wed Feb 04, 2004 8:38 am    Post subject: Reply with quote

Hmmm - I thought he wanted a resizable window... Confused
_________________________________________________________________________________________________________
Code:

rem -- Only uses specs on DIALOG ADD that don't change on resize --

OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,"Test Program",-1,0,500,340,RESIZABLE
  %%win = @winexists("Test Program")

  DIALOG ADD,EDIT,E1,4,4,0,24,"E1"
  DIALOG ADD,EDIT,E2,32,4,0,24,"E2"

  DIALOG ADD,LIST,L1,60,4,0,0
  DIALOG ADD,LIST,L2,60,100,0,0

  DIALOG ADD,BUTTON,B1,60,0,64,24,"B1"
  DIALOG ADD,BUTTON,B2,88,0,64,24,"B2"
  DIALOG ADD,BUTTON,B3,116,0,64,24,"B3"

  DIALOG ADD,PROGRESS,Prog1,0,0,0,20,0
  DIALOG SHOW

:RESIZE
  rem -- current window width/height/center(x) - locate elements with these --
  %%width = @winpos(%%win, W)
  %%height = @winpos(%%win, H)
  %%center = @div(%%width, 2)

  rem -- stuff on left of center --
  DIALOG SETPOS,E1,,,@diff(%%center, 40)
  DIALOG SETPOS,E2,,,@diff(%%center, 40)
  DIALOG SETPOS,L1,,,@diff(%%center, 40),@diff(%%height, 128)

  rem -- stuff in center --
  DIALOG SETPOS,B1,,@diff(%%center, 32)
  DIALOG SETPOS,B2,,@diff(%%center, 32)
  DIALOG SETPOS,B3,,@diff(%%center, 32)
  DIALOG SETPOS,Prog1,@diff(%%height, 60),,%%width

  rem -- stuff on right of center --
  DIALOG SETPOS,L2,,@sum(%%center, 36),@diff(%%width, @sum(%%center, 48)),@diff(%%height, 128)

  rem -- make minimum size 220 x 200 --
  if @greater(220, %%width)
     DIALOG SETPOS,,,,220
  end
  if @greater(200, %%height)
     DIALOG SETPOS,,,,,200
  end

:EVLOOP
  WAIT EVENT
  goto @event()

:B1BUTTON
:B2BUTTON
:B3BUTTON
  goto EVLOOP
 
:CLOSE
  EXIT


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
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Wed Feb 04, 2004 9:05 am    Post subject: Reply with quote

fair enough mac Very Happy

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
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