Jump to content


Photo

Can't reach grid end using down arrow


  • Please log in to reply
23 replies to this topic

#21 czbird

czbird
  • Members
  • 58 posts

Posted 11 September 2011 - 02:17 AM

After the check, the last version you sent this evening still have the Page Down problem.
But I am not sure if this was the update you were talking about, or is there a yet new one coming.
I'll better wait til tomorrow if something new arrives in my mailbox :)

Regards,
Jan

#22 czbird

czbird
  • Members
  • 58 posts

Posted 12 September 2011 - 12:01 PM

Hi Boki, thanks for the latest update.
It's now almost perfect :)

I have noticed yet one small thing the sample project 2 related to moving in grid after expanding/collapsing last visible row.
Please follow these steps to simulate it:

1) Fill the grid as usual (using the button)
2) Hit END to go to the last visible row (98)
3) Expand row 98 by clicking on the + sign
4) Collapse row 98 again
5) Hit END --> focus will go beyond last visible row

Thanks for your patience with me :)
Regards,
Jan

#23 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 13 September 2011 - 05:06 AM

Hi Jan,

No problem, it is my mistake. Please try next :


procedure TNextGrid.SetExpanded(Index: Integer; const Value: Boolean);
begin
  if Row[Index].Expanded <> Value then
  begin
    { Set Property and Refresh }
    Row[Index].Expanded := Value;
    RefreshRow(Index);

    if Row[Index].HasChildren then
    begin
      ExpandRows(Index, Row[Index].ChildCount, Value);
//      if Value then
//      begin
//        { Update LastVisibleRow in case
//          that Row is Expanded }
//      end;
      FLastVisibleRow := GetLastVisible(Pred(RowCount));
    end;

    UpdateVertScrollBar;

    { Trigger Event }
    DoExpand(Index);
  end;
end;


This will help for first time. I will try to optimize it.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
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.

#24 czbird

czbird
  • Members
  • 58 posts

Posted 13 September 2011 - 09:10 AM

Thanks Boki,
I think that the key movement problem is solved.

There is still some slight misbehaviour of the scrollbar, after level 2 children are added, but it is not clearly visible from current sample project.
I'll simulate it better and start new thread for it.

Regards,
Jan




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users