Setting property Text in a class derived from UpDownBase 
Author Message
 Setting property Text in a class derived from UpDownBase

I have inherited a class from System.Windows.Forms.TextBox.UpDownBase.
The help for this class states:
1. When you inherit from UpDownBase, you must override the following
members: DownButton, UpButton, UpdateEditText, ValidateEditText.
2. When overriding this method [UpdateEditText] in a derived class, be
sure to update the Text property of the up-down control.

However, no matter what I do, the changes to the base.Text property I
make in my class do not appear on the screen. Only when the control
inherited from UpDownBase gets the focus again does the updated text
appear. When I inherit my class from TextBox (and comment out those
things that do not apply to TextBox), the changes in the value of the
Text property appear as I expect them. Adding calls to Invalidate()
and Update() does not improve things. Can anybody help me here?

Thanks,

Jeroen.

PS1: The compiler does not complain when I do not override
ValidateEditText I my class inherited from UpDownBase. The problem is
the same, with or without ValidateEditText. Related question: How does
ValidateEditText indicate success or failure of the validation? The
help does not say ...
PS2: The problem also is the same when I inherit from DomainUpDown
instead of UpDownBase.



Sun, 21 Mar 2004 19:50:08 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Setting the text color in a CEditVioew derived class

2. Q: Set Tab Window Text in Property Page/Property Sheet

3. New Class derived from Class which derived from CWindowImpl

4. Activating the class wizard on a derived-derived Cwnd class

5. How to Create CCtrlView derived class based on CTreeCtrl derived class

6. How to Create CCtrlView derived class based on CTreeCtrl derived class

7. MessageMaps in a derived Property Page base class?

8. Adding controls to a property sheet that is embedded in a CView derived class

9. Setting full row select from derived class

10. Problem drawing text in a CSscrollView(..) derived class

11. Class in class OR class derived from class?

12. Changing the colour of Text selection in a CEdit derived class

 

 
Powered by phpBB® Forum Software