A
Alexander
I am building a little unique dialog editor and have derived some new
classes like DButton, DLabel and DTextBox. The user adds these
Controls to a panel which is part of a class Document which is not a
control. The controls in the dialog can be edited with a PropertyGrid.
When the user closes the dialog he edited it was first disposed,
because it was not part of an Control anymore. I changed that by
overriding the Dispose function of the Panel.
All of this works fine, except that Text of DLabel and DTextBox as the
only properties are deleted, when I close and open the dialog again.
All other properties remain the same, so the position, size of the
TextBox and Label and so on. Even own properties which I added to the
controls work fine and are still there. The Button also works
perfectly and the Text property stays the same.
So is the property Text deleted on some event on the Label and the
Textbox? I already tried to find out where it happens, but it seems
none of the events like OnTextChanged are triggered. I did also
override the property Text once to trace if it is called from
somewhere to reset the Text, but it isnt.
Does someone have an idea why and where the Text is deleted?
classes like DButton, DLabel and DTextBox. The user adds these
Controls to a panel which is part of a class Document which is not a
control. The controls in the dialog can be edited with a PropertyGrid.
When the user closes the dialog he edited it was first disposed,
because it was not part of an Control anymore. I changed that by
overriding the Dispose function of the Panel.
All of this works fine, except that Text of DLabel and DTextBox as the
only properties are deleted, when I close and open the dialog again.
All other properties remain the same, so the position, size of the
TextBox and Label and so on. Even own properties which I added to the
controls work fine and are still there. The Button also works
perfectly and the Text property stays the same.
So is the property Text deleted on some event on the Label and the
Textbox? I already tried to find out where it happens, but it seems
none of the events like OnTextChanged are triggered. I did also
override the property Text once to trace if it is called from
somewhere to reset the Text, but it isnt.
Does someone have an idea why and where the Text is deleted?