Results 1 to 2 of 2

Thread: Why Difrent Tooltip on Elabled and Disabled Button ?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2018
    Posts
    77

    Why Difrent Tooltip on Elabled and Disabled Button ?

    Hi everyone.

    for the buttons on form. try to use tooltip but some of button Disabled.

    When disabled Programaticly I can show tips. and the position also. but I can ot adjust initialDelay property. in same way I can not show enabled Button.

    Code:
    Dim ctrl As Control = Me.GetChildAtPoint(e.Location)
    
            If ctrl IsNot Nothing Then
    
                If ctrl Is Me.FirstBtn AndAlso Not IsShown Then
                    Dim tipstring As String = "First Record" 'Me.ToolTip1.GetToolTip(Me.FirstBtn)
                    Me.ToolTip1.Show(tipstring, Me.FirstBtn, Me.FirstBtn.Width / 2, Me.FirstBtn.Height)
    
                ElseIf ctrl Is Me.PrevBtn AndAlso Not IsShown Then
                    Dim tipstring1 As String = "Previous Record" ' Me.ToolTip1.GetToolTip(Me.PrevBtn)
                    Me.ToolTip1.Show(tipstring1, Me.PrevBtn, Me.PrevBtn.Width / 2, Me.PrevBtn.Height)
    
                ElseIf ctrl Is Me.NextBtn Then
                    Dim tipstring2 As String = "Next Record" 'Me.ToolTip1.GetToolTip(Me.NextBtn)
                    Me.ToolTip1.Show(tipstring2, Me.NextBtn, Me.NextBtn.Width / 2, Me.NextBtn.Height)
    
                ElseIf ctrl Is Me.LastBtn Then
                    Dim tipstring3 As String = "Last Record" 'Me.ToolTip1.GetToolTip(Me.LastBtn)
                    Me.ToolTip1.Show(tipstring3, Me.LastBtn, Me.LastBtn.Width / 2, Me.LastBtn.Height)
    
                    IsShown = True
    
                End If
            Else
                Me.ToolTip1.Hide(Me.FirstBtn)
                Me.ToolTip1.Hide(Me.PrevBtn)
                Me.ToolTip1.Hide(Me.NextBtn)
                Me.ToolTip1.Hide(Me.LastBtn)
    
                IsShown = False
    
            End If

    in here first previous buttons disabled and tooltip appear as initialdelay =1

    but enabled buttons next and last not show any tip on this way.


    only with this code (form_load) I can show tooltips on enabled buttons. but In this time I can not Adjust the position.

    Code:
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            ToolTip1.SetToolTip(Me.newButton, "Next Record")
    is there any way to show ToolTips on Enabled Buttons AS shown on Disabled Button that I can adjust the position myself .

    Advanced thanks.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Nov 2018
    Posts
    77

    Re: Why Difrent Tooltip on Elabled and Disabled Button ?

    I have solved the problem with using Label, instade of toolTip. Much Effective Flexible but yes much Code

Tags for this Thread

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