Minor problem with SetPerspectiv["GS"]

Dieter Lauff shared this question 3 years ago
Answered

I have a buttom with a script to change from graphic view 2 to graphic view 1+spreadsheet view.

SetPerspectiv["GS"]

The buttom works - but is it possible to choose the size of the graphic view window,

ex. 70% and the spreadsheet view 30 %

Comments (3)

photo
1

you can do it with JavaScript:

    ggbApplet.setPerspective('<perspective id="tmp"><panes><pane location="" divider="0.7" orientation="1" /></panes><views><view id="4097" visible="false" inframe="true" stylebar="true" location="1,1,1" size="400" window="100,100,700,550" /><view id="2" visible="false" inframe="false" stylebar="false" location="3,3" size="200" window="100,100,250,400" /><view id="8" toolbar="1001 | 1002 | 1003 || 1005 | 1004 || 1006 | 1007 | 1010 || 1008 | 1009 || 6" visible="false" inframe="false" stylebar="false" location="3,1" size="300" window="100,100,600,400" /><view id="512" toolbar="0 | 1 501 5 19 , 67 | 2 15 45 18 , 7 37 | 514 3 9 , 13 44 , 47 | 16 | 551 550 11 , 20 22 21 23 , 55 56 57 , 12 | 69 | 510 511 , 512 513 | 533 531 , 534 532 , 522 523 , 537 536 , 535 | 521 520 | 36 , 38 49 560 | 571 30 29 570 31 33 | 17 | 540 40 41 42 , 27 28 35 , 6 , 502" visible="false" inframe="false" stylebar="false" location="1,1" size="500" window="100,100,600,400" /><view id="1" visible="true" inframe="false" stylebar="false" location="3" size="837" window="100,100,600,400" /><view id="4" toolbar="0 || 2020 , 2021 , 2022 || 2001 , 2003 , 2002 , 2004 , 2005 || 2040 , 2041 , 2042 , 2044 , 2043" visible="true" inframe="false" stylebar="false" location="1" size="690" window="100,100,600,400" /><view id="16" visible="false" inframe="false" stylebar="false" location="1" size="300" window="50,50,500,500" /><view id="32" visible="false" inframe="false" stylebar="true" location="1" size="300" window="50,50,500,500" /><view id="64" toolbar="0" visible="false" inframe="false" stylebar="false" location="1" size="480" window="50,50,500,500" /><view id="128" visible="false" inframe="true" stylebar="false" location="1" size="480" window="50,50,500,500" /><view id="70" toolbar="0 || 2020 || 2021 || 2022" visible="false" inframe="false" stylebar="true" location="1" size="900" window="50,50,500,500" /><view id="43" visible="false" inframe="false" stylebar="false" location="1" size="450" window="50,50,500,500" /></views><toolbar show="true" items="0 | 1 501 67 , 5 19 , 72 | 2 15 45 , 18 65 , 7 37 | 4 3 8 9 , 13 44 , 58 , 47 | 16 51 64 , 70 | 10 34 53 11 , 24 20 22 , 21 23 | 55 56 57 , 12 | 36 46 , 38 49 50 , 71 | 30 29 54 32 31 33 | 17 26 62 73 , 14 68 | 25 52 60 61 | 40 41 42 , 27 28 35 , 6" position="1" help="false" /><input show="true" cmd="true" top="algebra" /><dockBar show="false" east="false" /></perspective>');

The string you put in is result of ggbApplet.getPerspectiveXML() with some adjustments: namely the divider="0.7" part says you want spreadsheet 30 percent wide.

photo
1

Pls see attached . I want graphics 1 size and graphics 2 size adjustable when checkbox is on,

when check box is off graphics 1 and 3D graphics size also adjustable. as in attached i can not change the size of perspective window.

photo
photo
1

you can do it with JavaScript:

    Thank you very much. That is very impressive and my first experience with Java Script

© 2019 International GeoGebra Institute