I have noticed that if a control originally doesn't contain `n in its text,
then it will be impossible to refresh its contents with another text containing `n.
This way will fail:
FT = Arial
BFS := 11
line1 := "Choose the number"
Gui New, hwndhwnd
Gui color, % wc
Gui font, % "s" . bfs, % ft
Gui add, Button, , % line1
Gui add, Button, x+10 gbye, Close
gui, show, x300 y200
msgbox, refresh
line2 := "take your`nboxes"
GuiControl, % hwnd . ":", Button1, % line2
return
bye:
gui, destroy
exitapp
return
But this one will work:
FT = Arial
BFS := 11
line1 := "Choose`n the number"
Gui New, hwndhwnd
Gui color, % wc
Gui font, % "s" . bfs, % ft
Gui add, Button, , % line1
Gui add, Button, x+10 gbye, Close
gui, show, x300 y200
msgbox, refresh
line2 := "take your`nboxes"
GuiControl, % hwnd . ":", Button1, % line2
return
bye:
gui, destroy
exitapp
return
Why is it so? And what should I do if I need to refresh contents of a control that
originally can only have one line, that is a line without `n ?