-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Horizontal autoscroll on focus does not properly scroll node into view if column width is larger than client width #397
Comments
From [email protected] on March 05, 2014 05:04:17 I'm not sure this is related but here's another horizontal scroll bug: in a combination of VST control anchors and option ScrollOnFocus we could get incorrect horizontal scroll on window maximize (see screenshots) In brief:
Attachment: VSTtest.zip screenshot 2014-03-05 002.png screenshot 2014-03-05 003.png clipboard.png |
From [email protected] on March 05, 2014 05:08:06 Additions:
|
@Fr0sT-Brutal: Is this problem still present? Unfortunately the links are not working any longer. |
I checked the repro simply using the grid demo in the Advanced sample project. I could not find any bad behavior unless the client width is smaller than the column width, as described in repro step 3. This is why I am going to change the issue title to make this clear. The patch seems incomplete because |
…scroll node into view if column width is larger than client width * Removed flag toDisableAutoscrollOnFocus from default configuration of a new Virtual TreeView to achieve a more common behavior with default properties.
…ot properly scroll node into view if column width is larger than client width * Removed flag toDisableAutoscrollOnFocus from default configuration of a new Virtual TreeView to achieve a more common behavior with default properties. # Conflicts: # CHANGES.txt # Source/VirtualTrees.pas
From [email protected] on December 04, 2013 20:15:41
What steps will reproduce the problem? 1. Create a virtualstringtree with header and 2 columns
2. TreeOption: toDisableAutoscrollOnFocus is FALSE, toFullRowSelect is FALSE
3. Make the width of the first column wider than the clientwidth of the treeview
4. Fill the treeview with nodes. What is the expected output? What do you see instead? I expect the focused node to become fully visible (automatic horizontal scroll to include the right margin of the node caption)
Instead the automatic horizontal scroll scrolls the right margin of the column into view. When the next node is focused, the window is scrolled to the left again. And so on. What version of the product are you using? On what operating system? 5.2.2 Please provide any additional information below. I currently work around this by patching the ScrollIntoView(node, center, horizontally) method along the following lines:
if Horizontally then
// 2) scroll horizontally
ScrolledHorizontally := ScrollIntoView(FFocusedColumn, Center);
// My patch: use the node rect for scrolling
if (R.Right > ClientWidth) then begin
VScrollBarVisible := (ScrollBarOptions.Scrollbars in [{$if CompilerVersion >=24}System.UITypes.TScrollStyle.{$ifend}ssBoth, {$if CompilerVersion >=24}System.UITypes.TScrollStyle.{$ifend}ssVertical]) and
(ScrollBarOptions.AlwaysVisible or (Integer(FRangeY) > ClientHeight));
SetOffsetX(FOffsetX - R.right + ClientWidth);
ScrolledHorizontally := TRUE;
end;
end;
Original issue: http://code.google.com/p/virtual-treeview/issues/detail?id=397
The text was updated successfully, but these errors were encountered: