| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Wed Feb 04, 2004 5:16 am Post subject: resizing help need |
|
|
hello all
I have gotten myself in a mess now how do i make this example resize right... meaning i want list1 and list2 to resize right i have buttons in the middle 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  |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Wed Feb 04, 2004 7:55 am Post subject: |
|
|
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 |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Feb 04, 2004 8:38 am Post subject: |
|
|
Hmmm - I thought he wanted a resizable window...
_________________________________________________________________________________________________________
| 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  _________________ 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 |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Wed Feb 04, 2004 9:05 am Post subject: |
|
|
fair enough mac
serge _________________
|
|
| Back to top |
|
 |
|
|
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
|
|