U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » UppHub » How to use GetCtrl(r,c) in GridCtrl ???
How to use GetCtrl(r,c) in GridCtrl ??? [message #26608] Fri, 14 May 2010 20:06 Go to next message
Didier is currently offline  Didier
Messages: 740
Registered: November 2008
Location: France
Contributor
Hi,

I'm desperatly trying to use the GetCtrl() method in GridCtrl class.

All columns were created using:
AddColumn( .... ).Ctrls<StaticTextCtrl>()
==> So all cells should have their own Ctrl

When I try to retreive the Ctrl of a cell by using GetCtrl(), it always returns 0 ??? while I was expecting the Ctrl previously created.

I am trying to dynamically change the bg/fg/font of just one cell

Help !!!

Re: How to use GetCtrl(r,c) in GridCtrl ??? [message #26621 is a reply to message #26608] Sun, 16 May 2010 23:35 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

Why do you write so difficult ?
If you want simple dynamically change colors try "Display" and write in cell value string + color code or use alternative array of color. And write your own display where you must parse color code from cell value.


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
Re: How to use GetCtrl(r,c) in GridCtrl ??? [message #26644 is a reply to message #26621] Mon, 17 May 2010 23:51 Go to previous message
Didier is currently offline  Didier
Messages: 740
Registered: November 2008
Location: France
Contributor
Hi sergey,

Thank's for you're reply.

I already looked at that, but GridControl only allows GridDisplay's which are not classic Display's. So it doesn't work "out of the box".
But I probably missed something ?!?

But I found a simple workaround:
I use a StaticTextCtrl and set Qtf text inside it using the '\1' escape sequence.

Previous Topic: Docking: How to call a callback on DockableCtrl's close
Next Topic: Docking: BUG + FEATURE: Disable Close completely
Goto Forum:
  


Current Time: Mon Sep 21 18:18:23 GMT+2 2026

Total time taken to generate the page: 0.00926 seconds