![]() |
#1 |
Senior Member
Join Date: Sep 2004
Location: Wisconsin, US
Posts: 258
|
Change Background Color of Text Box on Custom Page
Hello all.
I have scoured the forums, and help files, and tried to decipher the IoColors.zip example, but am still confused. Basically what I have is a custom page (ResultsPage) that contains a text box (Type=Text in the ResultsPage.ini). I have the text box set with: Flags=MULTILINE|VSCROLL|READONLY, as I'm using it to display a large amount of text. I want to keep in READONLY but don't like the gray background it produces. So... I just need a hand setting the background of this custom control (Type=Text) back to white as if it was not READONLY. Below is the code for the display of the ResultsPage, and the corresponding INI. Can someone please show me the commands I need? Thanks so much all! Jnuw code: ResultsPage.ini code: |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ResultsPage.ini"
Pop $R0 # HWND GetDlgItem $R1 $R0 1201 ; 1200 + Field # - 1 SetCtlColors $R1 000000 FFFFFF !insertmacro MUI_INSTALLOPTIONS_SHOW Instead of MUI_INSTALLOPTIONS_DISPLAY -Stu |
![]() |
![]() |
![]() |
#3 |
Senior Member
Join Date: Sep 2004
Location: Wisconsin, US
Posts: 258
|
Thanks again Stu, that did the trick perfectly. I really appreciate your help!
|
![]() |
![]() |
![]() |
#4 | |
Junior Member
Join Date: Dec 2006
Location: Malaysia
Posts: 28
|
Quote:
i have tried using this code for my custom pages to change the color of the text box to white color, but what happened is like the one u can see in the attachment. anyone have idea, how to modify my code, so that only the text box background color is changed, and i dont want that grey background color (the one in the red square) this is my .ini code [Settings] NumFields=5 [Field 1] Type=Label Text=Please enter your name and the name of the company for which you work. Left=0 Right=262 Top=0 Bottom=8 [Field 2] Type=Label Text=User Name: Left=0 Right=269 Top=25 Bottom=34 [Field 3] Type=Text Left=0 Right=272 Top=37 Bottom=51 [Field 4] Type=Label Text=Company Name Left=0 Right=273 Top=64 Bottom=72 [Field 5] Type=Text Left=0 Right=275 Top=74 Bottom=88 and this the coding in the function Function Create_Pg_UserInfo !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "userinfo.ini" ${if} $OLD == "$(^Name)" Abort ${endif} ReadRegStr $0 ${PRODUCT_UNINST_ROOT_KEY} "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "RegisteredOwner" !insertmacro MUI_INSTALLOPTIONS_WRITE "userinfo.ini" "Field 3" "State" "$0" ReadRegStr $0 ${PRODUCT_UNINST_ROOT_KEY} "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "RegisteredOrganization" !insertmacro MUI_INSTALLOPTIONS_WRITE "userinfo.ini" "Field 5" "State" "$0" Pop $R0 # HWND GetDlgItem $R1 $R0 1202 ; 1200 + Field # - 1 SetCtlColors $R1 "000000" "FFFFFF" !insertmacro MUI_HEADER_TEXT "Customer Information" "Please enter your information" !insertmacro MUI_INSTALLOPTIONS_DISPLAY "userinfo.ini" !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS FunctionEnd thank you guys for always helping me |
|
![]() |
![]() |
![]() |
#5 |
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
Now InstallOptions writes the HWND of every control to ini, so,
Instead of GetDlgItem $R1 $R0 1202 ; 1200 + Field # - 1 Use code: Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
![]() |
![]() |
![]() |
#6 |
Junior Member
Join Date: Dec 2006
Location: Malaysia
Posts: 28
|
Red Wine, do i need to include this:
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "userinfo.ini" ? i have tried using the code above, ReadRegStr $0 ${PRODUCT_UNINST_ROOT_KEY} "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "RegisteredOwner" !insertmacro MUI_INSTALLOPTIONS_WRITE "userinfo.ini" "Field 3" "State" "$0" ReadRegStr $0 ${PRODUCT_UNINST_ROOT_KEY} "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "RegisteredOrganization" !insertmacro MUI_INSTALLOPTIONS_WRITE "userinfo.ini" "Field 5" "State" "$0" ; !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "userinfo.ini" Pop $R0 # HWND ReadINIStr "$R1" "userinfo.ini" "field 3" "HWND" SetCtlColors "$R1" "000000" "FFFFFF" !insertmacro MUI_HEADER_TEXT "Customer Information" "Please enter your information" !insertmacro MUI_INSTALLOPTIONS_DISPLAY "userinfo.ini" !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS without the initdialog, i cant get the result at all, the box doesnt turn to white background color, and if i use with the initdialog, the result is the same as the attachment.. did i put the code at the wrong place? |
![]() |
![]() |
![]() |
#7 |
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
Yeah! you already discovered this!
1st init the dialog, set ctl colors and then show the dialog. You certainly know how to do it ![]() Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS Last edited by Red Wine; 22nd January 2007 at 12:22. |
![]() |
![]() |
![]() |
#8 |
Junior Member
Join Date: Dec 2006
Location: Malaysia
Posts: 28
|
I thought I had attached an attachment during my 1st post..but I didnt...
Im sorry Red Wine, I still cannot solve my prob.. please see the attachment i want to remove that grey background color |
![]() |
![]() |
![]() |
#9 |
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
code: Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
![]() |
![]() |
![]() |
#10 |
Junior Member
Join Date: Dec 2006
Location: Malaysia
Posts: 28
|
Anyway, what is the different between :
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG & INSTALLOPTIONS::InitDialog and !insertmacro MUI_INSTALLOPTIONS_DISPLAY & !insertmacro MUI_INSTALLOPTIONS_SHOW & INSTALLOPTIONS::SHOW |
![]() |
![]() |
![]() |
#11 |
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
The MUI macro system is designed for your convenience
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG == INSTALLOPTIONS::InitDialog /NOUNLOAD !insertmacro MUI_INSTALLOPTIONS_SHOW == INSTALLOPTIONS::SHOW !insertmacro MUI_INSTALLOPTIONS_DISPLAY == INSTALLOPTIONS::DISPLAY Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
![]() |
![]() |
![]() |
#12 |
Junior Member
Join Date: Dec 2006
Location: Malaysia
Posts: 28
|
ok Red Wine. thanx a lot for your help!
|
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|