Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Databases
»
[SOLVED] DBGrid remove red rectangle selection
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
IRC channel
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
Variables as indexes of a...
by
dsiders
[
Today
at 03:37:52 am]
[Solved] Can a thumbnail ...
by
jamie
[
Today
at 02:47:30 am]
Random crashes on Mac Stu...
by
jamie
[
Today
at 02:18:19 am]
How to access and set pro...
by
KodeZwerg
[
Today
at 01:55:40 am]
OpenSSL 3.0 vs Indy's 1.0...
by
Remy Lebeau
[
Today
at 01:26:36 am]
CompareText improvement
by
BeniBela
[
Today
at 12:31:51 am]
Fullscreen event?
by
KodeZwerg
[
Today
at 12:17:27 am]
fpc 3.3.1 or lazarus 2.3 ...
by
Martin_fr
[March 30, 2023, 11:29:01 pm]
Make build crashes
by
Jonas Maebe
[March 30, 2023, 09:19:49 pm]
Synapse TCP/IP client and...
by
GetMem
[March 30, 2023, 09:16:46 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] DBGrid remove red rectangle selection (Read 448 times)
Pe3s
Sr. Member
Posts: 380
[SOLVED] DBGrid remove red rectangle selection
«
on:
December 06, 2022, 05:58:25 pm »
Hello, is it possible to remove the red rectangle from the active selection?
«
Last Edit: December 08, 2022, 06:56:25 am by Pe3s
»
Logged
Nicole
Hero Member
Posts: 743
Re: DBGrid remove red rectangle selection
«
Reply #1 on:
December 06, 2022, 06:57:51 pm »
yes
write into the event
DBGrid1ColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);
Code: Pascal
[Select]
[+]
[-]
if
(
gdSelected
in
State
)
then
Canvas
.
Font
.
Color
:
=
clBlue
;
«
Last Edit: December 06, 2022, 07:01:01 pm by Nicole
»
Logged
dsiders
Hero Member
Posts: 822
Re: DBGrid remove red rectangle selection
«
Reply #2 on:
December 06, 2022, 09:29:27 pm »
Quote from: Pe3s on December 06, 2022, 05:58:25 pm
Hello, is it possible to remove the red rectangle from the active selection?
The focus rectangle gets drawn when DefaultDrawing is enabled. You can turn DefaultDrawing off and provide you own OnDraw* handlers.
Or you can change FocusColor to a color more pleasing to you.
Logged
Preview Lazarus 2.3.0 documentation at:
https://dsiders.gitlab.io/lazdocsnext
paweld
Hero Member
Posts: 633
Re: DBGrid remove red rectangle selection
«
Reply #3 on:
December 06, 2022, 11:18:20 pm »
https://lazarus-ccr.sourceforge.io/docs/lcl/grids/tcustomgrid.focusrectvisible.html
Code: Pascal
[Select]
[+]
[-]
DBGrid1
.
FocusRectVisible
:
=
Fasle
;
Logged
Best regards / Pozdrawiam
paweld
Pe3s
Sr. Member
Posts: 380
Re: DBGrid remove red rectangle selection
«
Reply #4 on:
December 08, 2022, 06:56:06 am »
Thank you
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Databases
»
[SOLVED] DBGrid remove red rectangle selection
TinyPortal
© 2005-2018