Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Cells appearance and text alignment
Re: Cells appearance and text alignment [message #25202 is a reply to message #25201] |
Sat, 13 February 2010 20:47 |
mdelfede
Messages: 1307 Registered: September 2007
|
Ultimate Contributor |
|
|
Hi Sender Ghost,
Sender Ghost wrote on Sat, 13 February 2010 20:33 |
mdelfede wrote on Sat, 13 February 2010 20:12 |
All works, but I can't disable/enable editing with an embedded control for selected cell(s).
Any way to do it ?
|
Try to use SetCtrl method of ArrayCtrl. Assign disabled and enabled ctrls to cells.
Also read about SetFormat and SetConvert methods for checks on valid characters.
|
Thank you, but it seems to me quite complicated... I must then keep an external array of controls in sync with ArrayCtrl when adding/removing rows.
It would be better to have this in ArrayCtrl.h :
Ctrl &GetEmbeddedCtrl(int i, int j) { return *GetCtrl(i, j).ctrl; }
I added it and it works fine, allowing enable/disable of embedded controls :
arrayCtrl.GetEmbeddedCtrl(line, col).Disable();
arrayCtrl.GetEmbeddedCtrl(line, col).Enable();
Mirek, would it be possible to have it added to main tree ?
The name is not the best, but GetCtrl() (which would be better...) is already used as a private function.
If not possible, it would be also enough a Enable(i, j)/Disable(i, j) pair, to allow single cell control of editing.
Last possibility.... make GetCtrl() protected, so I can derive from ArrayCtrl, if all above isnt' acceptable... Now it's private
Ciao
Max
[Updated on: Sat, 13 February 2010 20:51] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Tue May 07 23:04:32 CEST 2024
Total time taken to generate the page: 0.02639 seconds
|