Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
RichMemo
»
[SOLVED] Font Size - Does Nothing
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
[SOLVED] TPrintDialog Pro...
by
spuds
[
Today
at 01:30:20 am]
TPairsplitter could be be...
by
jamie
[
Today
at 12:36:34 am]
FloatToStr issue
by
J-G
[
Today
at 12:06:38 am]
Array of structure -> str...
by
jamie
[June 05, 2026, 11:52:24 pm]
Curved text in Lazreport
by
paweld
[June 05, 2026, 09:37:27 pm]
Release ray4laz 6.0
by
Fred vS
[June 05, 2026, 09:06:27 pm]
Very rough version of a s...
by
Hansvb
[June 05, 2026, 09:02:17 pm]
Pascal for AI Agent CLI T...
by
Martin_fr
[June 05, 2026, 08:01:11 pm]
Read/Parse PDB file to ge...
by
tooknox
[June 05, 2026, 07:36:13 pm]
storing assets for releas...
by
flowCRANE
[June 05, 2026, 07:30:13 pm]
FPC Unleashed (inline var...
by
BildatBoffin
[June 05, 2026, 06:46:14 pm]
Benchmark aligned vs unal...
by
LeP
[June 05, 2026, 06:33:08 pm]
TstringGrid read cell col...
by
hedgehog
[June 05, 2026, 06:29:11 pm]
Lazarus Main and Gnome/Wa...
by
JgQDev
[June 05, 2026, 06:16:31 pm]
Range checks and `Move` o...
by
ASerge
[June 05, 2026, 05:17:19 pm]
"Identifier idents no mem...
by
PawelO
[June 05, 2026, 04:15:49 pm]
Why is var after type in ...
by
Warfley
[June 05, 2026, 02:36:17 pm]
SnapModbus
by
ThomasK
[June 05, 2026, 01:40:22 pm]
Spell checking for IDE so...
by
Martin_fr
[June 05, 2026, 11:48:38 am]
Fix alt+letter dont show ...
by
mpau
[June 05, 2026, 04:02:50 am]
Conscious Artificial Inte...
by
schuler
[June 04, 2026, 11:14:34 pm]
LazNodeEditor (visual nod...
by
simone
[June 04, 2026, 08:05:18 pm]
Flamerobin error-message
by
tdb
[June 04, 2026, 05:31:45 pm]
Activate the find panel o...
by
maxnd
[June 04, 2026, 05:31:28 pm]
PDF generator
by
tdb
[June 04, 2026, 05:23:09 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Font Size - Does Nothing (Read 2746 times)
pixelink
Hero Member
Posts: 1269
[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!
LAZ 4.2.0 • VSSTUDIO(.Net) 2022 • Win11 • 32G RAM • Nvida RTX 4070 Ti Super
pixelink
Hero Member
Posts: 1269
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!
LAZ 4.2.0 • VSSTUDIO(.Net) 2022 • Win11 • 32G RAM • Nvida RTX 4070 Ti Super
pixelink
Hero Member
Posts: 1269
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!
LAZ 4.2.0 • VSSTUDIO(.Net) 2022 • Win11 • 32G RAM • Nvida RTX 4070 Ti Super
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
RichMemo
»
[SOLVED] Font Size - Does Nothing
TinyPortal
© 2005-2018