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
min() function behavior i...
by
Blaazen
[
Today
at 07:05:06 pm]
Default and speed effect
by
Martin_fr
[
Today
at 06:22:00 pm]
Why is the rectangle the ...
by
Bart
[
Today
at 05:56:45 pm]
process exeuction with in...
by
Edson
[
Today
at 05:33:56 pm]
How to dock Stack and Pro...
by
Molochnik
[
Today
at 05:18:45 pm]
BufferData not let appen...
by
paweld
[
Today
at 05:18:39 pm]
PostgreSQL: typeinfo erro...
by
Чебурашка
[
Today
at 05:16:48 pm]
Problema con base de dato...
by
Edson
[
Today
at 04:35:57 pm]
Adding Text to LineSerie ...
by
Dzandaa
[
Today
at 03:27:54 pm]
Best way to delete an ins...
by
Tomi
[
Today
at 02:59:21 pm]
Fast Base64 encoding/deco...
by
Okoba
[
Today
at 02:37:57 pm]
Hole punching - Step by S...
by
Warfley
[
Today
at 02:28:15 pm]
Anonymous Unions-Middle R...
by
jamie
[
Today
at 02:07:59 pm]
[Solved] TTreeFilterEdit....
by
AlexTP
[
Today
at 01:49:57 pm]
TFPGObjectList and custom...
by
jamie
[
Today
at 01:38:51 pm]
OPC client with Lazarus
by
Miniekans
[
Today
at 01:35:54 pm]
Threads - stringlist and ...
by
Warfley
[
Today
at 01:28:00 pm]
How to use customize outp...
by
artem101
[
Today
at 11:38:43 am]
Code clean up at TFontMan...
by
howardpc
[
Today
at 10:37:59 am]
Improvements in rtl/objpa...
by
lagprogramming
[
Today
at 09:01:19 am]
Magic, non referenced var...
by
Fibonacci
[
Today
at 07:17:05 am]
any one compile the gba e...
by
greenzyzyzy
[
Today
at 07:03:11 am]
Reading MAC address of Ac...
by
denerdener
[
Today
at 05:59:28 am]
help choosing laptop
by
dbannon
[
Today
at 05:09:30 am]
existing variables unavai...
by
Martin_fr
[May 29, 2023, 09:40:00 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] DBGrid remove red rectangle selection (Read 492 times)
Pe3s
Sr. Member
Posts: 411
[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: 745
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: 868
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: 671
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: 411
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