Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2006

Tip: Looking for answers? Try searching our database.

Listview items in place tool tip

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Angelina - 24 Jul 2006 07:42 GMT
Can any one please help me out. I need to add a in place tool tip on a list
view items. Do any one knows how to achieve this?

- Angelina
GAZ - 24 Jul 2006 07:58 GMT
Hello Angelina,

You can use the following code:

ListView1.Items(0).ToolTipText = "Some ToolTip Text"
ListView1.ShowItemToolTips = True

BR,

GAZ

> Can any one please help me out. I need to add a in place tool tip on a
> list view items. Do any one knows how to achieve this?
>
> - Angelina
Angelina - 24 Jul 2006 08:36 GMT
Hi GAZ,

I am using .net 1.1 and the soultion you provided seems not to work in that.
Might be its a feature of 2.0.

- Angi
GAZ - 24 Jul 2006 09:17 GMT
My bad. The feature is new to Net 2.0. I wouldn't know how to achieve the
same with 1.1.

Sorry,

GAZ

> Hi GAZ,
>
> I am using .net 1.1 and the soultion you provided seems not to work in
> that. Might be its a feature of 2.0.
>
> - Angi
Claes Bergefall - 24 Jul 2006 15:12 GMT
In 1.1 you will need to inherit it and set the LVS_EX_INFOTIP extended
style. You didn't say what language you're using but here is VB code for it:

Public Class ListViewEx
   Inherits ListView

   Private Const LVS_EX_INFOTIP As Integer = &H400
   Private Const LVM_FIRST As Integer = &H1000
   Private Const LVM_SETEXTENDEDLISTVIEWSTYLE As Integer = LVM_FIRST + 54
   Private Declare Auto Function SendMessage Lib "User32.dll" (ByVal hwnd
As IntPtr, ByVal msg As Integer, ByVal wParam As Integer, ByVal lParam As
Integer) As Integer

   Protected Overrides Sub OnCreateControl()
       MyBase.OnCreateControl()
       SendMessage(Me.Handle, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_INFOTIP,
LVS_EX_INFOTIP)
   End Sub
End Class

    /claes

> Hi GAZ,
>
> I am using .net 1.1 and the soultion you provided seems not to work in
> that. Might be its a feature of 2.0.
>
> - Angi

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.