![]() |
#1 |
Junior Member
Join Date: Jul 2019
Posts: 30
|
How to dynamically update a label text on the fly
Hi,
I have a label under which I am showing a progress bar. I need to display "Validation success " in the label after successful validation or else "Validation failed" . Below is the code snippet ${NSD_CreateLabel} 0.09u 5.54u 102.03u 14.5u "Validating process" $myLabel ${NSD_CreateProgressBar} 0.09u 21.54u 100% 10% "" Pop $hwnd ${NSD_AddStyle} $hwnd ${PBS_MARQUEE} ${NSD_CreateTimer} StartValidation 1000 Function StartValidation ${NSD_KillTimer} StartValidation Call Validate ${If} ${Errors} SendMessage $myLabel ${WM_SETTEXT} 0 "Failed" ${Else} SendMessage $myLabel ${WM_SETTEXT} 0 "Success" ${EndIf} SendMessage $hwnd ${PBM_SETMARQUEE} 0 0 FunctionEnd |
![]() |
![]() |
![]() |
#2 | |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,548
|
Sending a string in a message requires the STR: prefix
Quote:
IntOp $PostCount $PostCount + 1 |
|
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|