- NSIS Discussion
- Display label description when mouse over
Archive: Display label description when mouse over
jdt2oo7
31st December 2009 00:55 UTC
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!
jdt2oo7
2nd January 2010 08:37 UTC
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?
kichik
4th January 2010 16:01 UTC
You don't need to use FindWindow and GetDlgItem. $Label00 already contains the HWND. Use it directly.
jdt2oo7
6th January 2010 05:15 UTC
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.
Joel
6th January 2010 05:18 UTC
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
Garfyld
11th January 2010 10:38 UTC
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
kichik
17th January 2010 10:23 UTC
Garfyld, we can't really tell without any context. Attach the script.
Joel
17th January 2010 14:22 UTC
@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.
MSG
17th January 2010 17:57 UTC
...InstallOptions? He's using nsDialogs. o___O
Joel
17th January 2010 20:51 UTC
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 -.-
MSG
18th January 2010 04:56 UTC
Ahahoops... My bad. :-)
Joel
18th January 2010 15:11 UTC
Originally posted by MSG
Ahahoops... My bad. :-)
hehehe, no worries :up: :D