Old 1st June 2007, 11:29   #1
aviadlich
Junior Member
 
Join Date: Apr 2007
Posts: 35
Bold Text in text area

How can i format some of the lines in a text area of the finish page to be bold?
aviadlich is offline   Reply With Quote
Old 1st June 2007, 13:40   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
http://forums.winamp.com/showthread....ght=createfont
See the last post.

Stu
Afrow UK is offline   Reply With Quote
Old 3rd June 2007, 15:24   #3
aviadlich
Junior Member
 
Join Date: Apr 2007
Posts: 35
Sorry but i didn't succeed

currently i am using the:

!define MUI_FINISHPAGE_TEXT "Hurray finished the installation\r\nTHIS SHOULD BE A BOLD LINE"

i want the capitalized letters to be bold
aviadlich is offline   Reply With Quote
Old 3rd June 2007, 17:28   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You cannot do it that way. You have to add another label and set its font individually with CreateFont and SendMessage with WM_SETFONT.

Stu
Afrow UK is offline   Reply With Quote
Old 4th June 2007, 09:25   #5
aviadlich
Junior Member
 
Join Date: Apr 2007
Posts: 35
Thanks i finally got it

code:

!define MUI_PAGE_CUSTOMFUNCTION_PRE fin_pre
!define MUI_PAGE_CUSTOMFUNCTION_SHOW fin_show
!insertmacro MUI_PAGE_FINISH

Function fin_show

ReadINIStr $0 "$PLUGINSDIR\iospecial.ini" "Field 6" "HWND"
MessageBox MB_OK "${MUI_ICON}"
SetCtlColors $0 0x000000 0xFFFFFF
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $1 $0 1205 ;1200 + Field number - 1
CreateFont $0 "$(^Font)" "8" "700"; size 8 weight 700 makes it bold
SendMessage $1 ${WM_SETFONT} $0 0
FunctionEnd

Function fin_pre

WriteINIStr "$PLUGINSDIR\iospecial.ini" "Settings" "NumFields" "7"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Type" "Label"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Text" "THIS IS THE BOLDED TEXT"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Left" "120"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Right" "300"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Top" "100"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Bottom" "120"
FunctionEnd

aviadlich is offline   Reply With Quote
Old 4th June 2007, 12:37   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
This would be more efficient:
code:

Function fin_show
GetDlgItem $1 $MUI_HWND 1205 ;1200 + Field number - 1
SetCtlColors $1 0x000000 0xFFFFFF
CreateFont $0 "$(^Font)" "8" "700"; size 8 weight 700 makes it bold
SendMessage $1 ${WM_SETFONT} $0 0
FunctionEnd



Stu
Afrow UK is offline   Reply With Quote
Old 5th June 2007, 11:37   #7
aviadlich
Junior Member
 
Join Date: Apr 2007
Posts: 35
Thanks once again
I encountered a very strange behavior:
I have 2 installers that use both some of the function.
One of these functions is the fin_show.
I located all these functions in a lib.nsh file (in order not to write them twice) and included the lib.nsh in the main script of each installer.

If the function is located in the lib - the text is not bolded.
if it is in the main script it works great.
aviadlich is offline   Reply With Quote
Old 5th June 2007, 18:45   #8
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Make sure that you include it after including WinMessages.nsh and MUI.nsh.

Stu
Afrow UK is offline   Reply With Quote
Old 17th December 2012, 10:06   #9
fluidz91
Member
 
Join Date: Jun 2006
Location: Paris - FR
Posts: 58
Hi,

I have tried this code to set the MUI_UNPAGE_CONFIRM text to bold but I can't manage to make it work. If I set the code to MUI_PAGE_WELCOME that works correctly. I have tried WinSpy to get ID but don't know what value to take. I must precise that the text of the uninstall confirm is set by !define MUI_UNCONFIRMPAGE_TEXT_TOP "$(TEXT_UNINSTALL)"
Thank you.
fluidz91 is offline   Reply With Quote
Old 17th December 2012, 17:41   #10
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,530
In WinSpy its probably Control Id or something like that and the number might be in hex so you have to prefix it with 0x

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 18th December 2012, 08:11   #11
fluidz91
Member
 
Join Date: Jun 2006
Location: Paris - FR
Posts: 58
Ty, i'll try that.
fluidz91 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump