I need to display a list of countries, then base on user's selection, I need to display the EULA.
I use a list box to display countries, and store selection to a $Country variable.
1. I am creating a custom page using a listbox to display the EULA, but having trouble to import a .rtf file into a listbox. I have been reading forum and trying with no success, any help is appreciated.
2. I also need to display a checkbox on this custom page and won't allow user to move on unless this checkbox is checked, any pointer?
Thanks!
===============
; select country
Page custom CountrySelectionCreate CountrySelectionLeave
Function CountrySelectionCreate
nsDialogs::Create 1018
Pop $Dialog
${NSD_CreateListBox} 40 40 80% 70u ""
Pop $ListBox
SendMessage $ListBox ${LB_ADDSTRING} 0 "STR😁enmark"
SendMessage $ListBox ${LB_ADDSTRING} 0 "STR:Germany"
...
SendMessage $ListBox ${LB_ADDSTRING} 0 "STR:Singapore (Simplified Chinese)"
Pop $ListBox
nsDialogs::Show
FunctionEnd
Function CountrySelectionLeave
${NSD_LB_GetSelection} $ListBox $0
StrCpy $Country $0
FunctionEnd
==========
Page custom LicenseCreate LicenseLeave
Function LicenseCreate
; Create the custom page
nsDialogs::Create 1018
Pop $Dialog
!insertmacro MUI_HEADER_TEXT "EULA" "temp"
${NSD_CreateListBox} 40 40 80% 70u ""
HOW TO DISPLAY a .rtf file here?
Pop $ListBox2
nsDialogs::Show
FunctionEnd
Function LicenseLeave
FunctionEnd
Display text file in MUI custom page
5 posts
Why don't you try searching the forums for 'rich text'?
thanks! I found what I need:
If I have a string:
LangString Denmark ${LANG_ENGLISH} "Denmark"
and this is how I used it in a ListBox:
SendMessage $ListBox ${LB_ADDSTRING} 0 "STR:$(Denmark)"
This will displayed fine in the ListBox with English OS. However, when I run under Chinese OS, it is not displayed (blank).
1. Do I need to have another language string like this?
LangString Denmark ${LANG_TRADCHINESE} "Denmark"
2. If yes to #1, then I have to do this for all the languages that I want to display?
LangString Denmark ${LANG_ENGLISH} "Denmark"
and this is how I used it in a ListBox:
SendMessage $ListBox ${LB_ADDSTRING} 0 "STR:$(Denmark)"
This will displayed fine in the ListBox with English OS. However, when I run under Chinese OS, it is not displayed (blank).
1. Do I need to have another language string like this?
LangString Denmark ${LANG_TRADCHINESE} "Denmark"
2. If yes to #1, then I have to do this for all the languages that I want to display?