xbarns
7th October 2011 13:28 UTC
nsDialogs - changing from Text to Password Box
Hi all,
i use
${NSD_CreateText} 140 101 140 20 "TextBox"
Pop $TestSetup_TextBox
to create a text box, when a checkbox is checked i want to turn this into a Password Box, i tried
${NSD_AddStyle} $TestSetup_TextBox ${ES_PASSWORD}
${NSD_AddExStyle} $TestSetup_TextBox ${ES_PASSWORD}
but it does not work (kinda expected that). Anyway would this be the correct way to do this, or is there another way, or does this not work at all?
Thanks
x
T.Slappy
7th October 2011 14:01 UTC
${NSD_AddStyle} and ${NSD_AddExStyle} works only *before* function nsDialogs::Show is called.
Do you try to create checkbox and add listener to it [onClick method] and after clicking this checkbox [when page is already shown] then you try to set ${NSD_AddStyle} and ${NSD_AddExStyle} to checkbox?
That will not work!
Create two text boxes: 1. normal 2. password and hide/show appropriate one on checkbox click.
Do not forget to send text from one to the other after each change inside.
xbarns
7th October 2011 14:10 UTC
pardon me, but how do i "hide" a box?
T.Slappy
7th October 2011 14:18 UTC
Originally posted by xbarns
pardon me, but how do i "hide" a box?
ShowWindow $0 ${SW_HIDE}
where $0 is HWND of desired box
http://nsis.sourceforge.net/Docs/Cha...html#4.9.14.17xbarns
7th October 2011 14:20 UTC
One never stops learning, Thanks a lot!