« Return to Thread: How to embed a Checkbox into the FXTable?

Re: How to embed a Checkbox into the FXTable?

by Feng Feng :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hello Jeroen,

Is there an easy way that I can draw the CheckBox on a cell without directly copying the implementation code from FXCheckButton::onPaint

Thank you



From: Jeroen van der Zijp <jeroen@...>
To: Feng Feng <askfoxtoolkit@...>
Cc: FOX Users <foxgui-users@...>
Sent: Friday, June 19, 2009 10:22:26 AM
Subject: Re: [Foxgui-users] How to embed a Checkbox into the FXTable?

On Friday 19 June 2009, you wrote:
> Hello Jeroen,
>
> I have read the implementation code for FXComboTableItem.
> However, it doesn't tell me how to always display the control in the cell.
>
> table->setItem(0, 0, new FXComboTableItem("item1\nitem2\nitem3", NULL, NULL));
>
> FXComboTableItem only displays a Combo whenever the cell is in edit mode. I need to know how to
> always display the Combo in the cell rather than just in edit mode.

You don't want to do that since having one widget for every cell would be *very* expensive.

What you want to do is overload the drawContent() in the FXTableItem and make it draw what
you'd like to see when the cell is not being edited.


    - Jeroen





------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

 « Return to Thread: How to embed a Checkbox into the FXTable?