Project

General

Profile

res-width2.p

Șerban Bursuc, 08/08/2025 08:03 AM

Download (2.47 KB)

 
1
define frame fr_main.
2
define frame fr_parent.
3
define frame fr1.
4
frame fr_parent:frame = frame fr_main:handle.
5
frame fr1:frame = frame fr_parent:handle.
6
define button btn.
7
enable btn with frame fr_main.
8

    
9
current-window:width-pixels = 900.
10
current-window:height-pixels = 500.
11

    
12
frame fr_main:scrollable = true.
13
frame fr_main:width-pixels = 900.
14
frame fr_main:height-pixels = 500.
15
frame fr_main:bgcolor = 7.
16

    
17
frame fr_parent:scrollable = true.
18
frame fr_parent:width-pixels = 900.
19
frame fr_parent:height-pixels = 300.
20
frame fr_parent:virtual-width-pixels = 900.
21
frame fr_parent:virtual-height-pixels = 600.
22
frame fr_parent:BGCOLOR = 5.
23

    
24
frame fr1:width-pixels = 300.
25
frame fr1:height-pixels = 250.
26
frame fr1:bgcolor = 6.
27

    
28
btn:row = 16.
29

    
30
/*define variable debuginfo as character view-as editor size 30 by 6.*/
31
/*enable debuginfo with frame fr_main.                               */
32
/*/*debuginfo:FORMAT = "x(128)".*/                                   */
33
/*debuginfo:width-pixels = 400.                                      */
34
/*debuginfo:height-pixels = 100.                                     */
35
/*debuginfo:row = 14.                                                */
36
/*debuginfo:column = 60.                                             */
37
/*debuginfo:bgcolor = 15.                                            */
38

    
39
on choose of btn do:
40
    frame fr1:width-pixels = 600.
41
    frame fr_parent:width-pixels = 600.
42
end.
43

    
44
on window-resized of current-window do:
45
/*    frame fr_parent:virtual-width-pixels = current-window:width-pixels.*/
46
    frame fr_main:width-pixels = current-window:width-pixels.
47
    frame fr_parent:width-pixels = current-window:width-pixels + 20.
48
    frame fr_main:virtual-width-pixels = current-window:width-pixels.
49
    frame fr_parent:VIRTUAL-WIDTH-PIXELS = current-window:width-pixels.
50
/*    debuginfo:screen-value = "fr_parent: virtual-width-pixels: " + STRING(frame fr_parent:VIRTUAL-WIDTH-PIXELS) + " width-pixels: " + STRING(frame fr_parent:VIRTUAL-WIDTH-PIXELS) + "~n".                       */
51
/*    debuginfo:screen-value = debuginfo:screen-value + "fr_main:   virtual-width-pixels: " + STRING(frame fr_main:VIRTUAL-WIDTH-PIXELS) +   " width-pixels: " + STRING(frame fr_main:VIRTUAL-WIDTH-PIXELS) + "~n".*/
52
    message "fr_parent: virtual-width-pixels: " frame fr_parent:VIRTUAL-WIDTH-PIXELS " width-pixels:" frame fr_parent:WIDTH-PIXELS.
53
    message "fr_main: virtual-width-pixels: " frame fr_main:VIRTUAL-WIDTH-PIXELS " width-pixels:" frame fr_main:WIDTH-PIXELS.
54
end.
55

    
56
wait-for close of current-window.
57