Deliverator
10th December 2003 16:53 UTC
InstallOptions text trimming value?
I'm using the following line of code to enter text into an InstallOptions window, berfore the window is displayed.
!insertmacro MUI_INSTALLOPTIONS_WRITE "Mem" "Field 2" "Text" " $3%"
This works fine.
However, the text appears to be trimmed. Is there a way to stop this?
I'm trying to "center" the text.
Thanks
Joost Verburg
10th December 2003 17:01 UTC
To change the position of the text you should change the positioning setting like Left, Top etc.
Deliverator
10th December 2003 17:50 UTC
I'm trying to center the text in a label or text box. The reason is that the background is set to a specific color. I want the text centered in the colored box.
Joost Verburg
10th December 2003 18:25 UTC
Can you post a script that compiles on every system, an INI file and a screenshot?
Deliverator
11th December 2003 14:01 UTC
It's part of a large script. I'll work on making a small example script over the weekend.
Thanks.
Joost Verburg
11th December 2003 16:17 UTC
You can also modify the alignment using the System plug-in and Windows API (put the code between IO InitDialog and Show functions)
Deliverator
11th December 2003 20:23 UTC
I tried this, but no luck (hint - not real good with API):
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "MemStats"
Pop $hWnd
GetDlgItem $dlgItem $hWnd 1203
SetCtlColors $dlgItem 000000 FFFF80
System::Call "$SYSDIR\gdi32::SetTextAlign (i $dlgItem, l 7) l ?e"
pop $R0
messagebox mb_ok $R0
!insertmacro MUI_INSTALLOPTIONS_SHOW
$R0 is a 0.
I think that indicates an error.
Any Ideas?
Vytautas
11th December 2003 22:59 UTC
Error value of 0 usually means that the function completed properly, e.g. no error
Vytautas