Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Hide Widget: (4 Items)
   
Hide Widget  
Hello Again,

Is it possible to activate a property to hide a widget? For example, I have a button that I want to hide completely 
under certain conditions. I have looked at all the resources but found no appropriate flag or property. I imagine the 
other way is to have a canvas, e.g. image area as a background, and hide it behind that.Which would bring me to the 
question, what is the name of the z-axis property to set in code?
RE: Hide Widget  
Hide --> PtUnrealizeWidget()
Un-hide ;-) --> PtRealizeWidget()
Z-order --> PtWidgetToFront(), PtWidgetToBack(), PtWidgetInsert(),
PtReparentWidget().
Re: RE: Hide Widget  
Hello Misha

Thanks for both your replies. 
I encountered another unknown which you hopefully will be able to help

How do you label a Trend box? do you have do add labels separately? Especially enumerating a grid would be very 
difficult? And also, how to you rotate a label along the y axis. 

What I want to do is to plot data points vs. time. I am also open to other suggestions besides using a Trend box

Thanks 
Marcel
RE: RE: Hide Widget  
1. You are right; you have to create and place labels yourself. You need
to drop your labels beside the trend widget and align them accordingly.
The grid widgets do not render labels on their own by default. PtMTrend
can be setup to call your own grid render function in which you may
render/adjust labels positions yourself.
2. Unfortunately photon library doesn't provide a way of rotation text.
You will need to write some code to get this working (provided that you
really need to render on an angle). Here are two ways of doing this:
- render text with PfRender() (or just PtLabel) into an image and then
rotate (img_rotate_ortho())
- use FontFusion API (T2K_*()) directly, take a look at this sample app
--
http://community.qnx.com/integration/viewvc/viewvc.cgi/trunk/apps/gf/fon
t-test/?root=graphics&system=exsy1001