Hello,
if I have controls in TRichview, is it possible that TRichView automatically scrolls that a control is in view if I navigate through the controls for example with tab
At the moment the controls get the focus but I can't see it if the control is outside of the visible part of the Richview.
Best wishes
Bernhard
Scroll in View
-
- Posts: 71
- Joined: Sat Aug 27, 2005 9:34 pm
-
- Posts: 104
- Joined: Mon Nov 26, 2007 1:49 pm
-
- Posts: 104
- Joined: Mon Nov 26, 2007 1:49 pm
-
- Site Admin
- Posts: 17604
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Visible area:
Top: rv.VScrollPos*rv.VSmallStep
Bottom: Top+rv.ClientHeight
As for the control. To get vertical coordinate, it's better to use Control.Tag instead of Control.Top.
TRichView stores controls' Y coordinates in their Tag properties (Control.Tag). It's because too large control coordinates (> 30000 pixels) are not processed correctly by Windows. Control.Tag always contains the correct coordinate, Control.Top is limited to 0..30000 range.
Top: rv.VScrollPos*rv.VSmallStep
Bottom: Top+rv.ClientHeight
As for the control. To get vertical coordinate, it's better to use Control.Tag instead of Control.Top.
TRichView stores controls' Y coordinates in their Tag properties (Control.Tag). It's because too large control coordinates (> 30000 pixels) are not processed correctly by Windows. Control.Tag always contains the correct coordinate, Control.Top is limited to 0..30000 range.