doniking
7th August 2009 22:15 UTC
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
7th August 2009 22:59 UTC
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
8th August 2009 00:30 UTC
@jpderuiter: thanks! now im sure i will be using NSD_OnChange
doniking
8th August 2009 04:33 UTC
i dont know how to show the tooltips using ToolTips plugin.
Its examples only show OnMouseOver event.
Please help
jpderuiter
8th August 2009 13:10 UTC
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...
doniking
8th August 2009 22:16 UTC
@jpderuiter: I am end up using MessageBox to implement it
Thanks anyway!
jpderuiter
8th August 2009 22:26 UTC
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
9th August 2009 18:47 UTC
@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