#1
|
|||
|
|||
Resizing/scaling panels
Hi,
I am having the following problems while scaling a TabPanel: 1.Keeping its initial proportions. I've noticed that in my example (attached), setting the scale back to 1 does not reset the panel to its original size (use keys 'q' and 'w'). Might this be a combination of Tab and Grid panels or something else? 2. The included quad nodes in the GridPanel do not resize proportionally. Is this the expected behavior? Resizing them individually can be a pain. 3. How can I keep the panel in a fixed position in the window when resizing the window? Do I have to calculate the offset and change it on update (it it's not stuck on any of the corners or the center)? Thanks! |
#2
|
|||
|
|||
Any update on this? Items 1 and 2 are still a problem. Item 3 has been replied in another thread by Jeff and appreciate it.
Thanks! |
#3
|
|||
|
|||
I'll have to check with a developer for further assistance.
|
#4
|
|||
|
|||
1) There is a bug that involves the panel scaling and fontsize. This will be fixed in the next Vizard release. However, there is a workaround which is actually better than setting the font size. You can apply an additional scale to the "gridPanel", which will be relative to it's inherited scale from the parent tabPanel. So instead of changing the font size, do something like the following:
Code:
gridPanel.setPanelScale(1.75) Code:
import viz import vizdlg import vizact viz.go() tabPanel = vizdlg.TabPanel() gridPanel = vizdlg.GridPanel() tabPanel.addPanel('TEST',gridPanel,viz.ALIGN_LEFT_TOP) gridPanel.setPanelScale(1.75) rowText = viz.addText('TEXT') gridPanel.addRow([rowText]) viz.link(viz.LeftTop,tabPanel,offset=(10,-10,0)) vizact.onkeydown('1',tabPanel.setPanelScale,1) vizact.onkeydown('2',tabPanel.setPanelScale,2) Code:
quad = viz.addCheckbox() quad.setScale([3,3,1]) quad.disable() quad.texture(viz.addTexture('lake3.jpg')) gridPanel.addRow([quad]) Last edited by Jeff; 06-26-2015 at 12:51 PM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom-permanent tooltip | tokola | Vizard | 2 | 06-09-2015 01:20 PM |