Tu sei qui
Home › Forum home › NSISDialogDesigner › Wishlist › More flexibility for font definitions ›More flexibility for font definitions
Please let our ADS show!
This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).
Please:
- disable your AdBlocker by adding CoolSoft website to whitelist
- give the proper cookie consent
- enable JavaScript for this website
This seconds wait is to let you update your browser configuration...
Ok, I've done the required changes... now show me your content!- regodon
- Posts: 2
- Joined: 21 Nov 2014 - 11:24
- coolsoft
- Posts: 1978
- Joined: 25 Mar 2012 - 01:19
ControlCustomScript can be safely used to put your custom "needings".
I'll wrote only the font-related part into ControlCustomScript part, leaving the rest managed by NSISDialogDesigner:
SendMessage $hCtl_Form1_Label1 ${WM_SETFONT} $(^Font) 0
Hope I correctly understood your question, otherwise feel free to post a sample script here and describe how it should be.
- regodon
- Posts: 2
- Joined: 21 Nov 2014 - 11:24
I just needed to define a font using the current family name and size, but underlined. I solved it using this CustomControlScript:
CreateFont $0 "$(^Font)" "$(^FontSize)" "400" /UNDERLINE SendMessage $hCtl_mypage_label3 ${WM_SETFONT} $0 0
If I could had set font's size and name as ^Font and ^FontSize directly using the properties panel, then I won't needed to define a CustomControlScript. Not a big issue, obviously.
All started when I changed main font using SetFont (and/or Resoure Hacker), and then every custom page's layout broke because fonts aren't created as relative to the main font... Now I have to manually fix every label, defining CustomControlScript for each label.
- coolsoft
- Posts: 1978
- Joined: 25 Mar 2012 - 01:19
Another idea could be a single CustomScript at page level where you read the desired font only once:
SendMessage $hCtl_mypage ${WM_GETFONT} $0 0
Then set this font to all other controls:
SendMessage $hCtl_mypage_label1 ${WM_SETFONT} $0 0 SendMessage $hCtl_mypage_label2 ${WM_SETFONT} $0 0 SendMessage $hCtl_mypage_label3 ${WM_SETFONT} $0 0 ...
Haven't tested it but it should work...
Navigazione
Login
Clicca qui per supportare il mio lavoro con PayPal
oppure offrimi un caffè