Textbox with title
I want to create a TextBox which will include a title within the box instead of using a label outside the box. It will look like this:
+----------------------------------+
+Title: Normal texbox's text +
+----------------------------------+
It has to keep all existing textbox functionality, including multiline property. When the user type some text (or text added programmatically), it should appear after the title. If we erase some text or clear the box, the title should remain.
I know I will have to override the OnPaint method and use graphics functions but I am a bit confused. Does anyone has any clue to help me? I will use 3 properties for the title: TitleText, TitleColor and TitleBkgColor.
Thanks a lot.
Claude
I want to create a TextBox which will include a title within the box instead of using a label outside the box. It will look like this:
+----------------------------------+
+Title: Normal texbox's text +
+----------------------------------+
It has to keep all existing textbox functionality, including multiline property. When the user type some text (or text added programmatically), it should appear after the title. If we erase some text or clear the box, the title should remain.
I know I will have to override the OnPaint method and use graphics functions but I am a bit confused. Does anyone has any clue to help me? I will use 3 properties for the title: TitleText, TitleColor and TitleBkgColor.
Thanks a lot.
Claude