CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2002
    Location
    Felixstowe, Suffolk
    Posts
    2

    Enhancing The Textbox

    I would like to write a set of classes for handling different types of textboxes.

    My base class ( myTextBoxBase ) would need have a method to set the tooltip, so I will have a user control containing a textbox and a tooltip control.

    I would then like to derive another class from myTextBoxBase which would allow me to handle the right click mouse button. It would still have the ability to handle tooltips, as it inherited from myTextBoxBase.

    It all sounds reasonable, but I cannot get it to work.

    As a test I simplified my functionality, and created myTextBoxBase with the tooltip functionality. All works fine.

    I then derived another textbox form myTextBoxBase, and all this would do is be a textbox with a Red background.

    It has tooltip functionality but doesn't have a Red background.

    When I tried to get the right mouse button handling, again it had the tooltip functionality but not the right mouse button.

    All I want to end up with in my test is

    Am I doing anything obviously wrong ? Do I need to call base constructors?

    Anyone any idea what I'm missing?

    Pete

  2. #2
    Join Date
    Jun 2002
    Location
    Philadelphia, PA
    Posts
    85
    This may not apply, but I remember I had some issues trying to create an extended textbox. The issue that I ran into is that the text box isn't handled by the CLR and instead controlle entirely by Windows. You may also want to investigate, if you haven't already, the control sytles enumeration where you can enable "UserPaint".

  3. #3
    Join Date
    Sep 2002
    Location
    Felixstowe, Suffolk
    Posts
    2
    Thanks, I actually got very confused, started again with a simple example, and have it all working now.

    Thanks again.
    Pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured