The instructions that do not work are in the lines 90-95. Many thanks again.
It does work the first time, but you can't see it because of a logic error in your code. The self.height hasn't been set yet when you try to use it in SetSize so you resize the edit control to be almost invisible. The attributes are being reset on subsequent showings because the grid has code in place to set the edit control's attributes to match the cell's font and color attributes. You can override this behavior by overriding the editor's Show method, like this:
Is it correct to understand that this behavior (as far as the cell’s attributes are concerned) will apply to practically all kind of control in a cell editor?
The instructions that do not work are in the lines 90-95. Many thanks again.
It does work the first time, but you can’t see it because of a logic
error in your code. The self.height hasn’t been set yet when you try to
use it in SetSize so you resize the edit control to be almost invisible.
The attributes are being reset on subsequent showings because the
grid has code in place to set the edit control’s attributes to match the
cell’s font and color attributes. You can override this behavior by
overriding the editor’s Show method, like this: