Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Pt_GHOST for a PtComboBox: (3 Items)
   
Pt_GHOST for a PtComboBox  
I am hoping to be able to make the entire PtComboBox appear ghosted.

Right now, when I set the Pt_GHOST attribute, only the text inside the PtComboBox is ghosted.  The arrow button continue
 to appears normal.

I assume the PtComboBox is actually made up of a PtText widget, a PtButton widget and a PtList widget.

If this is true, how can I set the Pt_GHOST attribute for the button part of the control.

If that is not true, is there a way to make the entire control appear ghosted?

The requirement is for the entire use interface to start off as disabled.  This means that all widgets need to be 
blocked and that the appearance needs to reflect this.  The Pt_GHOST attribute is what has been chosen as the "disabled"
 appearance and it is used for the widgets: PtButton, PtEdit, etc... but the PtComboBox arrow button does not change 
appearance when this attribute is set.

Kendall

Re: Pt_GHOST for a PtComboBox  
Unfortunately the 'arrow' is not a button. It is a control surface. (see http://www.qnx.com/developers/docs/6.5.0/topic/
com.qnx.doc.photon_prog_guide/ctrl_surfaces.html). It only has one rendering mode.

You can in theory override the draw function of this surface. Here is an approximate set of steps to take:

-- use PtFindSurfaceByAction() -- the action id is Pt_COMBOBOX_LIST_ACTION.
-- Save the draw_f (PtSurface_t member)
-- Assign your own draw_f
-- Within your draw_f function call into the saved one to render the arrow
-- if the combo is disabled -- render an alpha rectangle on top of the arrow -- to simulate a "faded" effect.

Re: Pt_GHOST for a PtComboBox  
Thank you.

> Unfortunately the 'arrow' is not a button. It is a control surface. (see http:
> //www.qnx.com/developers/docs/6.5.0/topic/com.qnx.doc.photon_prog_guide/
> ctrl_surfaces.html). It only has one rendering mode.
> 
> You can in theory override the draw function of this surface. Here is an 
> approximate set of steps to take:
> 
> -- use PtFindSurfaceByAction() -- the action id is Pt_COMBOBOX_LIST_ACTION.
> -- Save the draw_f (PtSurface_t member)
> -- Assign your own draw_f
> -- Within your draw_f function call into the saved one to render the arrow
> -- if the combo is disabled -- render an alpha rectangle on top of the arrow -
> - to simulate a "faded" effect.
>