WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-08-2015, 10:51 AM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
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!
Attached Files
File Type: zip TabPanel_resize.zip (1.1 KB, 861 views)
Reply With Quote
  #2  
Old 06-13-2015, 08:06 AM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
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!
Reply With Quote
  #3  
Old 06-15-2015, 04:29 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
I'll have to check with a developer for further assistance.
Reply With Quote
  #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
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom-permanent tooltip tokola Vizard 2 06-09-2015 01:20 PM


All times are GMT -7. The time now is 08:07 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC