Home » Community » Newbie corner » GridCtrl + rich texts
Re: GridCtrl + rich texts [message #50396 is a reply to message #50395] |
Mon, 15 October 2018 11:43 |
|
deep
Messages: 263 Registered: July 2011 Location: Bangalore
|
Experienced Member |
|
|
Hi
I have done this. Which is working for me for GridCtrl.
It is not elegant but working.
Color in QFT must be given as "[@(nn.nn.nn) " or "[$(nn.nn.nn) "
class Gridqtfdisplay : public GridDisplay
{
public:
virtual void Paint ( Draw& w, int x, int y, int cx, int cy, const Value& val, dword style,
Color& fg, Color& bg, Font& fnt, bool found, int fs, int fe )
{
String s;
s = val;
RegExp r1 ( "(\\[([\\@\\$])\\((\\d+)\\.(\\d+)\\.(\\d+)\\))", RegExp::UNICODE );
while ( r1.GlobalMatch ( s ) )
{
if ( r1[1] == "@" )
fg = Color ( StrInt ( r1[2] ), StrInt ( r1[3] ), StrInt ( r1[4] ) );
if ( r1[1] == "$" )
bg = Color ( StrInt ( r1[2] ), StrInt ( r1[3] ), StrInt ( r1[4] ) );
}
QTFDisplay().Paint ( w, RectC ( x, y, cx, cy ), val, fg, bg, style );
}
};
Warm Regards
Deepak
|
|
|
|
|
GridCtrl + rich texts
By: idkfa46 on Thu, 02 August 2012 14:29
|
|
|
Re: GridCtrl + rich texts
By: Didier on Fri, 03 August 2012 18:19
|
|
|
Re: GridCtrl + rich texts
|
|
|
Re: GridCtrl + rich texts
By: koldo on Sat, 04 August 2012 15:38
|
|
|
Re: GridCtrl + rich texts
By: forlano on Sun, 05 August 2012 12:32
|
|
|
Re: GridCtrl + rich texts
|
|
|
Re: GridCtrl + rich texts -- Array Control
By: deep on Sun, 14 October 2018 10:19
|
|
|
Re: GridCtrl + rich texts
By: deep on Sun, 14 October 2018 13:34
|
|
|
Re: GridCtrl + rich texts
By: deep on Mon, 15 October 2018 11:43
|
|
|
Re: GridCtrl + rich texts
By: idkfa46 on Sun, 05 August 2012 00:38
|
|
|
Re: GridCtrl + rich texts
|
|
|
Re: GridCtrl + rich texts
By: idkfa46 on Sun, 05 August 2012 16:23
|
|
|
Re: GridCtrl + rich texts
By: Didier on Sun, 05 August 2012 20:49
|
|
|
Re: GridCtrl + rich texts
|
|
|
Re: GridCtrl + rich texts
By: forlano on Thu, 09 August 2012 13:48
|
|
|
Re: GridCtrl + rich texts
|
|
|
Re: GridCtrl + rich texts
By: forlano on Thu, 09 August 2012 19:17
|
|
|
Re: GridCtrl + rich texts
|
|
|
Re: GridCtrl + rich texts
By: forlano on Thu, 09 August 2012 22:09
|
Goto Forum:
Current Time: Thu Apr 25 23:43:14 CEST 2024
Total time taken to generate the page: 0.04060 seconds
|