Archive: Display label description when mouse over


Display label description when mouse over
Hello all,

I am creating a custom component page. In this page, I have many labels and when user clicks on a particular label, its description will be displayed.

${NSD_OnClick} $Label00 Label0_OnClick

Function Label0_OnClick
${NSD_SetText} $ProductDescriptionLabel $(Product1)
FunctionEnd

I am wondering if we can display a label's description when user mouse over it?

Only thing I found so far is .onMouseOverSection, that is only working for a section, right?

Thanks for your help!


http://nsis.sourceforge.net/ToolTips_plug-in


Hi kichik, thanks for always helping... I am using the plugin but it is not displaying the label's description when I mouse over the label:

${NSD_CreateLabel} 17 50 120 15 "my label"
Pop $Label00

FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $1 $0 $Label00 # $1 will have the HWND of the Label00
ToolTips::Classic $1 "test"


Is there anything wrong with above code? And does it matter if I am using in a custom page?


You don't need to use FindWindow and GetDlgItem. $Label00 already contains the HWND. Use it directly.


Cool thanks! Is there a way for us to make the Tooltip window bigger? I have a lot of text, and it only displays the first line.


Originally posted by jdt2oo7
Cool thanks! Is there a way for us to make the Tooltip window bigger? I have a lot of text, and it only displays the first line.
As far I know, may accept multiple lines both classic and modern style of the tooltip..heheh...as I recall, 'cause I created the plugin..a loooooong time ago :D

Hi folks. I'm totaly new with NSIS and still not getting it :-(

I try to get a tool tip for a button created in a custom page. I guess something is wrong with my way to retrieve the HWND, maybe ...

What I try to do is the following:

!insertmacro MUI_INSTALLOPTIONS_READ $0 "newStarter.ini" "Field 6" "HWND" # Field 6 is my button, defined in mynewStarter.ini
ReadINIStr $1 "$PLUGINSDIR\newStarter.ini" "Field 6" "HWND" # retrieve the HWND of my button
ToolTips::Classic $1 "tooltiptext"

Thanks for your help and hints


Garfyld, we can't really tell without any context. Attach the script.


@Garfyld: Hi...I recommend you to look into InstallOptions readme file => link.
As far I remember, you need to first alloc into memory the dialog with initDialog, use your code to give the tooltip and later display the dialog with show.

Is easy, just follow the docs.

The example of initDialog and show see the example named "Fonts and colors" from above link.


...InstallOptions? He's using nsDialogs. o___O


Originally posted by MSG
...InstallOptions? He's using nsDialogs. o___O
According to its example, garfyld used this code:

!insertmacro MUI_INSTALLOPTIONS_READ $0 "newStarter.ini" "Field 6" "HWND" #

Id nsDialog uses that macro, then I'm an old nsis user -.-

Ahahoops... My bad. :-)


Originally posted by MSG
Ahahoops... My bad. :-)
hehehe, no worries :up: :D