none
Can we associate tooltip as a property to the control?? RRS feed

  • Question

  • I'm trying out to store the tooltip information inside the control as a property. By this i need not to maintain a dictionary. I'm just working on to put the tooltip as a property to the control. Please help me.

    Monday, August 13, 2012 11:22 AM

Answers

  • Hi Sammi,

    It is similar.

    I have built a user control use the VS wizard, and add two properties like this:

        Public Property MyCustomToolTip As ToolTip
        Public Property MyCustomString As String

    And I see it in the properties grid:

    so please try it.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, August 14, 2012 6:52 AM
    Moderator

All replies

  • Hi Sangame,

    Welcome to the MSDN Forum.

    Based on your description, it seems OK. What issue do you encounter now? As far as I know, the message of a tooltip is a string, so you can make a string property to store the message. And in the set method of this string, set it to tooltip, too.

    I hope this will be helpful, if not, please provide more information about you have done. Thank you.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, August 14, 2012 2:24 AM
    Moderator
  • Hi Mike,

    Thanks for your wishes and response. Actually i'm try to develop a custom tooltip wherein it is having few more attributes along with string. Say image, hyper links etc. That anyway i'm taking care by info object.

    My question is very simple. When i drag and drop control on the form (using VS 2010 editor). I can see some properties like Font color, Back color etc. Like wise i want to have tooltip as kind of property to the control. In simple terms i want to use tooltip as property but not as a control (pl correct me if i'm wrong).

    Waiting for your suggestion.

    Thank you in advance.

    Sammi

    Tuesday, August 14, 2012 3:17 AM
  • Hi Sammi,

    It is similar.

    I have built a user control use the VS wizard, and add two properties like this:

        Public Property MyCustomToolTip As ToolTip
        Public Property MyCustomString As String

    And I see it in the properties grid:

    so please try it.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, August 14, 2012 6:52 AM
    Moderator