Skip to content
⌘ NSIS Forum Archive

showing tooltips on NSD_CreateDirRequest

8 posts

doniking#

showing tooltips on NSD_CreateDirRequest

Hello, i really need helps.

I have a text edit control using NSD_CreateDirRequest and want to prevent user to type any of these chars: / * ? " < > |
when they do, it should show a tooltips and blocks the characters typed.

Please help posting some codes to do this.
Thanks for any help.

Regards,
Donie
jpderuiter#
Use NSD_OnChange to get a callback from the DirRequest as soon as the user changes the text field.
Then use NSD_GetText to get the entered text, check for invalid characters, and use NSD_SetText to set the (corrected) text field text.
You can use the Tooltips plugin (http://nsis.sourceforge.net/ToolTips_plug-in) to show a tooltip.
doniking#
i dont know how to show the tooltips using ToolTips plugin.
Its examples only show OnMouseOver event.
Please help
jpderuiter#
Hmm, I didn't think of that...
I think you have to edit the plugin to do what you want.
Maybe it's easier to show a label when an invalid character is typed...
jpderuiter#
The annoying thing with MessageBoxes is that users have to click OK evertime they enter an invalid character.
That's why I proposed to unhide an (initially hidden) label.
doniking#
@jpderuiter: yeah i know that. i was thinking about labels too. but there is no space left on the dialog 🙁
still waiting for ToolTips plugin development or looking another way