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
FPC on Rasp Pi, non Lazar...
by
MarkMLl
[
Today
at 08:16:29 pm]
problem executting tproce...
by
Martin_fr
[
Today
at 08:14:04 pm]
Fpcupdeluxe
by
DonAlfredo
[
Today
at 08:11:02 pm]
linux x64 assembler
by
Kays
[
Today
at 08:03:39 pm]
Icon Application
by
lucamar
[
Today
at 07:44:34 pm]
Indicator arrow in String...
by
pcurtis
[
Today
at 07:42:12 pm]
converting C++ over laz, ...
by
BeniBela
[
Today
at 07:38:08 pm]
Problem with receiving ev...
by
skalogryz
[
Today
at 07:22:23 pm]
How to load list of inter...
by
jmpessoa
[
Today
at 06:44:11 pm]
TMPlayerControl Click No ...
by
local-vision
[
Today
at 06:43:27 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Font Size - Does Nothing (Read 419 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