View Single Post
  #4  
Old 06-26-2015, 12:49 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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)
Below is an example:

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)
2) Yes, only GUI objects will scale with the panel scale. If you just want to have a textured quad you could add a textured checkbox and that will scale with the panel:

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.
Reply With Quote