CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: tooltiptext

  1. #1
    Join Date
    Oct 2001
    Location
    uae
    Posts
    11

    tooltiptext

    I have a problem with listview tooltip. I have created a listview control on a form. Now, I want to use the tooltiptext property of the listview control so that when my mouse move over a particular item in the listview, the tooltiptext will display the item name. Pls help by giving me some VB Codes
    Thanks!

    sooraj






  2. #2
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: tooltiptext

    Code:
    Option Explicit
      'you've to add a columnHeader
      'to make it works
      'Show in  a lvReport
    Private Sub Form_Load()
      ListView1.View = lvwReport
      ListView1.ColumnHeaders.Add , "col1", "List Of Items"
      Dim i as Integer
      for i = 1 to 10
         ListView1.ListItems.Add , "a" & i, "Text" & i
         ListView1.ListItems(i).ToolTipText = "Text" & i
      next i
    End Sub


    Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
    and all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

    The Rater
    Last edited by Cimperiali; July 26th, 2004 at 04:53 AM.
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

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