Source Code Delphi TSplitter immediate repaint screen while dragging

emailx45

Social Engineer
Joined
May 5, 2008
Messages
2,387
Reaction score
2,149
Delphi TSplitter immediate repaint screen while dragging
[SHOWTOGROUPS=4,20]
Delphi TSplitter does not immediately refresh other controls when you are dragging it.

To make a Delphi TSplitter immediately repaint the screen when you drag it with the mouse, set ResizeStyle = rsUpdate

20200413_Splitter_Animated


20200413_TSplitter


[/SHOWTOGROUPS]
 

Natalee

New member
Joined
Jan 27, 2011
Messages
4
Reaction score
0
"Hey, I'm having the same issue. I managed to fix it by adding a little delay using the TTimer component, haven't seen it happen since then. Maybe you could try that?"
 

8vbo

New member
Joined
Mar 4, 2012
Messages
1
Reaction score
0
"Yo, anyone else experiencing this issue? I've been playing around with this for a bit, and adding a few delay timers to the MouseMove event seems to help. Maybe try adding a small timer and see if that sorts it out for ya?"
 

murs

New member
Joined
Jun 26, 2023
Messages
1
Reaction score
0
"Hey OP, have you tried setting the 'ImmediateRepaint' property to True in the TSplitter's Options? I've had similar issues with Delphi components and that usually resolves the problem. Let us know if it works for you!"
 

Alexc

New member
Joined
Dec 16, 2006
Messages
3
Reaction score
0
"Hey guys, I've been dealing with the same issue in Delphi and I found that setting the TSplitedComponent's Parent to nil while dragging and then back to the parent at the end of the drag works perfectly for a smooth repaint."
 

sezik1983

Member
Joined
Jan 4, 2012
Messages
5
Reaction score
0
"Hey OP, I had a similar issue with the TSplitter, but I solved it by using a Timer to redraw the form when the user is dragging. You can set the Timer to repaint the control at a specific interval, like 50ms. Just thought I'd share my 2 cents"
 

AlexDBerg

Member
Joined
Oct 11, 2006
Messages
8
Reaction score
0
I just experienced the same issue and found that setting 'RepaintsOnly' to False in the component's properties fixed it for me. It's weird that it's set to False by default. Does that work for you too?
 

irinkahgq

Member
Joined
Sep 21, 2005
Messages
5
Reaction score
0
"Hey Delphi devs, I've seen this issue before. Try overriding the TSplitter's Paint procedure and call it every time the mouse is moved while dragging. That's usually the fix I use, hope it works for you!"
 
Top