Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
Font draw in customdraw in dbgid
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
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Error printing to zebra p...
by
magleft
[
Today
at 08:06:34 pm]
Integer maths > 16 bits
by
MathMan
[
Today
at 08:01:44 pm]
FClass<TArray<Char>> can ...
by
paule32
[
Today
at 07:54:08 pm]
New Big Integer library i...
by
ad1mt
[
Today
at 07:39:59 pm]
for-in loop with record
by
Curt Carpenter
[
Today
at 07:36:59 pm]
Tprocess capturing progre...
by
Bart
[
Today
at 07:30:06 pm]
FPC on Web3
by
VisualLab
[
Today
at 07:26:48 pm]
Common File Dialogs Have ...
by
msintle
[
Today
at 06:15:33 pm]
need a dummies guide to c...
by
VisualLab
[
Today
at 06:10:46 pm]
How to build own ide in L...
by
Edson
[
Today
at 05:50:51 pm]
Q about subverting type c...
by
440bx
[
Today
at 04:24:20 pm]
Error using dll in Debug ...
by
myisjwj
[
Today
at 04:20:55 pm]
ZenGL Update +android + M...
by
fcu
[
Today
at 04:18:42 pm]
Can we build big erp appl...
by
Packs
[
Today
at 04:14:33 pm]
IDE autocompletion: "try ...
by
ASerge
[
Today
at 04:02:26 pm]
Does the Alt-Brackets key...
by
vfclists
[
Today
at 02:46:39 pm]
Cross compiling from macO...
by
Thaddy
[
Today
at 01:10:28 pm]
Opacity of BGRA TBCPanel ...
by
LBox
[
Today
at 01:03:58 pm]
Ubuntu Mate / Laz 2.2.6 /...
by
MarkMLl
[
Today
at 12:24:23 pm]
how to update application...
by
sstvmaster
[
Today
at 11:59:49 am]
qt5: can't install trunk ...
by
dbannon
[
Today
at 11:58:56 am]
Some observations on the ...
by
Thaddy
[
Today
at 10:51:39 am]
Field of types ftString n...
by
matthijsj
[
Today
at 09:43:37 am]
How to use Quartz 2D (Cor...
by
daniel_sap
[
Today
at 07:27:45 am]
Cant interact with Main F...
by
Thaddy
[
Today
at 06:59:57 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Font draw in customdraw in dbgid (Read 713 times)
mikutu
New Member
Posts: 16
Font draw in customdraw in dbgid
«
on:
September 10, 2024, 10:28:00 am »
if set color in DBGrid1DrawColumnCell and call DefaultDrawColumnCell font draw another if not use custom draw. In picture attach up - standart draw, down - custom draw.
Code: Pascal
[Select]
[+]
[-]
procedure
TfrmMain
.
DBGrid1DrawColumnCell
(
Sender
:
TObject
;
const
Rect
:
TRect
;
DataCol
:
Integer
;
Column
:
TColumn
;
State
:
TGridDrawState
)
;
var
x
,
y
:
integer
;
isSelect
:
boolean
;
begin
isSelect
:
=
(
(
gdFocused
in
State
)
or
(
gdSelected
in
State
)
)
;
if
(
not
isSelect
)
then
begin
TDBGrid
(
Sender
)
.
Canvas
.
Font
.
Color
:
=
$00C04020
;
TDBGrid
(
Sender
)
.
DefaultDrawColumnCell
(
Rect
,
DataCol
,
Column
,
State
)
;
end
;
end
;
Logged
jamie
Hero Member
Posts: 6579
Re: Font draw in customdraw in dbgid
«
Reply #1 on:
September 10, 2024, 11:00:54 pm »
Use "OnPrepairCanvas" to set the font and colors prior to painting.
Logged
The only true wisdom is knowing you know nothing
mikutu
New Member
Posts: 16
Re: Font draw in customdraw in dbgid
«
Reply #2 on:
September 12, 2024, 08:02:02 am »
thank you, it's work
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
Font draw in customdraw in dbgid
TinyPortal
© 2005-2018