Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
RichMemo
»
[SOLVED] Font Size - Does Nothing
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
IRC channel
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Using WebSockets with Laz...
by
Warfley
[
Today
at 06:05:25 pm]
Sort more String Grid col...
by
Handoko
[
Today
at 06:04:16 pm]
How to prevent text to be...
by
Ramses
[
Today
at 05:54:12 pm]
Missing components etc.
by
MarkMLl
[
Today
at 05:50:47 pm]
STM32 interrupts
by
MiR
[
Today
at 05:50:08 pm]
Get Previous record ?
by
winni
[
Today
at 05:15:46 pm]
Units/Forms added to proj...
by
GetMem
[
Today
at 05:12:57 pm]
StretchDraw differences b...
by
lainz
[
Today
at 05:03:04 pm]
[SOLVED] ATTabs resp. Ext...
by
d7_2_laz
[
Today
at 04:46:28 pm]
[SOLVED] ATTabs howto; wh...
by
d7_2_laz
[
Today
at 04:12:10 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Font Size - Does Nothing (Read 425 times)
pixelink
Hero Member
Posts: 1243
[SOLVED] Font Size - Does Nothing
«
on:
July 04, 2020, 04:28:52 pm »
Hi,
When I change a value in a font size combobox... nothing happens
I am converting the font size text to an integer.
What am I missing?
Code: Pascal
[Select]
[+]
[-]
var
fnt
:
TFontParams
;
begin
txtNote1
.
GetTextAttributes
(
txtNote1
.
SelStart
,
fnt
)
;
txtNote1
.
SetRangeParams
(
txtNote1
.
SelStart
,
txtNote1
.
SelLength
,
[
tmm_Styles
,
tmm_Color
]
,
''
,
StrToInt
(
cbFontSize
.
Text
)
,
clBlack
,
[
]
,
[
]
)
;
Thanks in advanced
«
Last Edit: July 04, 2020, 05:23:31 pm by pixelink
»
Logged
Can't Type - Forgetful - Had Stroke = Forgive this old man!
Pixelink Media
LAZ 2.08 • VSSTUDIO(.Net) 2019 • Win10 • 16G RAM • Nivida GForce RTX 2060
pixelink
Hero Member
Posts: 1243
Re: Font Size - Does Nothing
«
Reply #1 on:
July 04, 2020, 05:09:42 pm »
Okay... got this to work on normal button.
But it doesn't work on a combo box change event - generates an error
See here:
https://forum.lazarus.freepascal.org/index.php?board=71.0
Code that woks on button.
Code: Pascal
[Select]
[+]
[-]
var
fnt
:
TFontParams
;
begin
fnt
.
Name
:
=
''
;
fnt
.
Style
:
=
[
]
;
//[fsBold or Italic];
fnt
.
Size
:
=
24
;
txtNote1
.
SetTextAttributes
(
txtNote1
.
SelStart
,
txtNote1
.
SelLength
,
fnt
)
;
txtNote1
.
SetFocus
(
)
;
Logged
Can't Type - Forgetful - Had Stroke = Forgive this old man!
Pixelink Media
LAZ 2.08 • VSSTUDIO(.Net) 2019 • Win10 • 16G RAM • Nivida GForce RTX 2060
pixelink
Hero Member
Posts: 1243
Re: Font Size - Does Nothing
«
Reply #2 on:
July 04, 2020, 05:23:18 pm »
Well... i found a workaround for the combobox.
Instead of using change event... I am using "onSelect"... that bypasses the error (or bug)
Logged
Can't Type - Forgetful - Had Stroke = Forgive this old man!
Pixelink Media
LAZ 2.08 • VSSTUDIO(.Net) 2019 • Win10 • 16G RAM • Nivida GForce RTX 2060
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
RichMemo
»
[SOLVED] Font Size - Does Nothing
TinyPortal
© 2005-2018