Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Substring formating in ArrayCtrl (SqlCtrl)
Re: Substring formating in ArrayCtrl (SqlCtrl) [message #22819 is a reply to message #22817] Wed, 19 August 2009 06:22 Go to previous messageGo to previous message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
Sorry, I mislead you. I checked with my code where I use text attributes with TreeCtrl. I use AttrText, which is handled by all standard Display classes. The code looks like

vf_id = wtree.Add(parent_id, TreeCtrl::Node(AttrText("Verb frames").Ink(LtBlue())));


AttrText is not that flexible as QTF is. It just lets you set attributes for the whole text.

If I need to display a QTF text as a node I create a RichTextCtrl and set it as a node of a tree. The same technique should work with ArrayCtrl.

My code looks similar to an example below.

Array<RichTextCtrl> rt_ctrl;

rt_ctrl.Add().SetZoom(zoom).NoSb().SetQTF(tree_str);
rt_ctrl.Top().WhenLink = THISBACK(on_link);

// Zoom related suff ...
int x = rt_ctrl.Top().GetWidth();
Size sz(x, rt_ctrl.Top().GetHeight(x));
sz = zoom * sz;
sz.cx += 1;
	
wtree.Add(parent_id, TreeCtrl::Node(rt_ctrl.Top()).SetSize(sz));  


Regards,
Novo
 
Read Message
Read Message
Read Message icon14.gif
Read Message
Read Message
Read Message
Previous Topic: ArrayCtrl column width problem
Next Topic: Problem with Drag&Drop in ArrayCtrl
Goto Forum:
  


Current Time: Mon May 20 21:11:39 CEST 2024

Total time taken to generate the page: 0.00622 seconds