Scrollbar style
#21
Posted 13 July 2008 - 11:08 PM
My solution doesn't sync the vertical scrollbar correctly in combination with these functionalities, but I think it shouldn't be too hard to implement that...
#22
Posted 14 July 2008 - 11:48 AM
I will do this. I think that I will need one for loop for this situation.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#23
Posted 15 July 2008 - 10:52 AM
Nice to see the scrollbar now reflects the size of the thing being scrolled. But did you think of a minumum size too? To prevent sliders being to small to drag with a mouse?
#24
Posted 15 July 2008 - 12:32 PM
I think that there is already minimum size and that page size can't be smaller than some amount of pixels.
I still need to get figure out how all work and I hope that I will
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#25
Posted 26 July 2008 - 10:45 PM
I have re-upload pre-release files on Members Section with included AIM's fix.
I hope that it work fine.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#26
Posted 27 July 2008 - 12:39 PM
Boki, thanks for applying my code
One issue I have found so far with the horizontal scrollbar:
You have removed the line "HorzScrollBar.Position := GetRealScrollPosition(HorzScrollBar);" in "TNxCustomGridControl.UpdateHorzScrollBar;"
But this line is important when you try the following:
1. Fill a grid where no horizontal scrollbar is displayed
2. Enlarge a column until the horizontal scrollbar is displayed
3. Scroll the horizontal scrollbar a bit to right
4. Decrease the column with until the horizontal scrollbar is removed
You will see that the grid doesn't move back to the most left column. With "HorzScrollBar.Position :=" this will be ensured.
If you are not able to follow my description, I'll make a small video...
I'll do more testing next week, but everything else looked OK in a first test...
#27
Posted 27 July 2008 - 01:37 PM
Thank you too,
I have add this line, but not sure do I need to add it to the Vertical scroll bar.
I have also one problem when you press bottom arrow on vertscrollbar, it keeps scrolling. Do you have idea what we may do. This happen in Demo 1 project.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#28
Posted 27 July 2008 - 02:23 PM
I think you need it only for the horizontal scrollbar...
I haven't found a way to reproduce it here. What must I exactly click to get this behavior?
Only clicking the bottom arrow stops scrolling when the end of rows is arrived...
#29
Posted 27 July 2008 - 02:29 PM
I thinks that it only happen under some cases. Now I have repeat test and nothing.
I really hope that I am near stable version
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#30
Posted 28 July 2008 - 10:38 AM
I have found another issue which does not appear in my original version. Download the attached demo, click the "Button5" button and try to scroll down to the last row. You'll see that it jumps back to the top.
To fix this, replace the code in "TNxCustomGridControl.UpdateVertScrollBar" from
VertScrollbar.Position := 0;
back to
VertScrollbar.Position := 0;
You had changed the < to <= what causes this effect...
Attached Files
#31
Posted 28 July 2008 - 03:01 PM
I have change it back. Not sure why this was needed
regards and thanks
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#32
Posted 28 July 2008 - 08:18 PM
Adding back the VertScrollbar.Position line fixes these problems.
My code is now:
...........
begin
ScrollMax := GetVisibleRows;
if GridStyle = gsReport then PageSize := GetRowsTotalHeight
else PageSize := GetSlidesTotalHeight;
if ScrollMax > PageSize then
begin
VertScrollBar.Max := ScrollMax;
VertScrollBar.PageSize := PageSize + 1;
VertScrollbar.Position := FFirstRow; // ----------------------- added
VertScrollBar.LargeChange := VertScrollBar.PageSize;
end else
begin
VertScrollBar.Max := 0;
end;
// Set position to zero if no scrollbar is displayed (for example after resizing the window)
if ((VertScrollBar.Max < VertScrollBar.PageSize) and (VertScrollbar.Position <> 0)) then
VertScrollbar.Position := 0;
end;
I had the VertScrollbar.Position assignment for months in my tweaked version and it worked without problems... So I think you can add it without side effects...
#33
Posted 28 July 2008 - 08:51 PM
Will try to find a reproducible demo tomorrow...
#34
Posted 28 July 2008 - 09:09 PM
The last scroll up is made with the cursor up key.
This video was made without .Position:=
It would work with .Position, but .Position is not compatible with invisible or collapsed rows
Probably you have an idea how to bypass that problem. I'll run more tests tomorrow...
Attached Files
#35
Posted 28 July 2008 - 09:25 PM
I will see what I can do
This scrollbar was real pain.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#36
Posted 28 July 2008 - 11:36 PM
Here's my latest version:
...........
function GetFirstVisibleRowNumber:integer;
var
i:integer;
begin
result := 0;
for i:=0 to FFirstRow-1 do
begin
if GetRowVisible(i) then
inc(result);
end;
end;
begin
ScrollMax := GetVisibleRows;
if GridStyle = gsReport then PageSize := GetRowsTotalHeight
else PageSize := GetSlidesTotalHeight;
if ScrollMax > PageSize then
begin
VertScrollBar.Max := ScrollMax;
VertScrollBar.PageSize := PageSize + 1;
VertScrollBar.LargeChange := VertScrollBar.PageSize;
end else
begin
VertScrollBar.Max := 0;
end;
// Set position to zero if no scrollbar is displayed (for example after resizing the window)
if ScrollMax <= PageSize + 1 then
VertScrollbar.Position := GetFirstVisibleRowNumber;
//if (VertScrollBar.Max < VertScrollBar.PageSize) and (VertScrollbar.Position <> 0) then
// VertScrollbar.Position := 0;
end;
#37
Posted 29 July 2008 - 12:14 AM
Thank you again very much! I will test it too.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#38
Posted 30 July 2008 - 12:16 AM
I have include it in my code. I hope that it will work well. I only hope that code is not to much complicated to maintain in future.
Thank you again,
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#39
Posted 30 July 2008 - 11:43 AM
I haven't found any issues here in my tests, everything seems to work well now.
#40
Posted 30 July 2008 - 03:41 PM
Thank you again, I ove you a favor.
regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users