Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Location
    UK
    Posts
    24

    Unanswered: ControlTipText not showing for listbox

    Hi!

    I have a form with three listboxes on, and several other controls.

    Eventually, I want to be able to show some extended information about each line in the listbox by setting the ControlTipText in code with the MouseDown event, then clear it with the MouseUp event.

    I experimented, and couldn't get anything to display, so I tried hard setting the ControlTipText from the Properties settings in Design View.

    Still nothing!

    It works for other controls on the form (command buttons etc), but not on any of the listboxes.

    I have also tried it on another listbox in a different form, and again, nothing.

    Can anyone suggest any reason why this may be the case?

    I'm using A2K.

    Thanks,

    Qpid.

  2. #2
    Join Date
    Mar 2004
    Location
    belgium
    Posts
    290
    this is the code I used and it works nice:

    Private Sub List0_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me!List0.ControlTipText = "test Down"
    End Sub

    Private Sub List0_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me!List0.ControlTipText = ""
    End Sub

    see the attachments

    I have Access 2003
    Attached Thumbnails Attached Thumbnails MouseDown.jpg   MouseUp.jpg  

  3. #3
    Join Date
    Jul 2004
    Location
    UK
    Posts
    24
    That's virtually the code I'm using anyway, but the problem is that I just can't seem to get a ControlTipText to appear after being set - even when hard set in the properties.

    Thanks,

    Qpid.

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    I tried to duplicate this and found (in AC200) that the ControlTip Text only works on a ListBox if the cursor hovers over the attached label for the control! If you use a ComboBox the ControlTip Text only appears if you hover over the up and down arrows for the box. All of which kinda precludes you from doing what you want to, if I understood your initial posting correctly. The only workaround I can come up with would be to have a label, say, adjacent to the listbox. Have this start out being invisible, and if you do the mouse_down thing have it check for the value you've picked and display your "help" for the particular selection in the label. When the listbox loses focus or on the mouse_up, have it return to it's invisible state.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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