Jump to content


DelphiToday

Member Since 01 Jun 2013
Offline Last Active Private
-----

Topics I've Started

Looking for ScrollToCenter;

09 February 2021 - 09:26 PM

Hello Boki,

 

I am looking for a function ScrollToCenter to get the selected one neatly in the middle of the VISIBLE screen VirtualNextgrid. That is much nicer. :)

Let's say screen top is position 10 and screen bottom position 20 it must jump to position 15.

 

I now use: SelectCell(0, FoundIndex); but that jumps always to bottom in View not center.

Hope you understand problem.

 

You now have:

 

procedure TNxCustomGrid6.ScrollToBottom;
procedure TNxCustomGrid6.ScrollToCell(ACol, ARow: Integer);
procedure TNxCustomGrid6.ScrollToSelected;
procedure TNxCustomGrid6.ScrollToTop;

 

Will you make a new function?

 

I need this very fast so can I do this with little trick myself???

 

Regards,

Eduard.


SelectionTextColor for Cell

14 May 2020 - 09:27 PM

 Hi Bojan,

I can't adjust the selection color for each line. As an example I use 'SelectionTextColor := clGreen' if Played is True but that gives wrong colors.

Is it possible to add:
Cell.SelectionTextColor ?
Or something I can use?

procedure TForm3.NxVirtualCellSource61GetCell(Sender: TObject; ACol,
  ARow: Integer; Cell: INxCell);
begin
  case ACol of
    0: Cell.AsString := GlobalRec.CurrentFile;
  end;

  { Default }
  Cell.Font.Color := clBlue;
  NextGrid.SelectionTextColor := clBlue;

  { Change }
  if (GlobalRec.Played) then
  begin
    NextGrid.SelectionTextColor := clGreen; // Color Problems
    Cell.Font.Color := clGreen;
  end;
end;

Kind regards,

Eduard.

 


FirstVisibleCol

16 April 2020 - 05:47 AM

Hi Bojan,

 

Can you add FirstVisibleCol ?

 

This is to be used in:

SelectCell(FirstVisibleCol, FirstVisibleRow, Shift);

 

You can also change it in CustomGrid6:

(But happy with only: FirstVisibleCol)

 

procedure TNxCustomGrid6.SelectFirst(Shift: TShiftState = []);

procedure TNxCustomGrid6.SelectLast(Shift: TShiftState = []);

 

Why?

When the first column is not Visible (VirtualGrid) and SelectFullRow = True when calling SelectFirst() the SelectionBar is not visible!

 

Regards,

Ed.

 

 

 

 


HideWhenEmpty

09 April 2020 - 08:04 AM

Hello,

 

HideWhenEmpty is not working with VirtualGrid. Is this correct?

(The previous field become longer)

 

Or I don't know what the function is exactly. Please tell me.

 

Regards.