Jump to content


DelphiToday

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

Posts I've Made

In Topic: FirstVisibleCol

09 June 2020 - 11:07 AM

See if you can do it and if you feel like it. No problem.


In Topic: FirstVisibleCol

06 June 2020 - 07:39 PM

This is to be used in:

 

SelectCell(FirstVisibleCol, FirstVisibleRow, Shift);

 

So i need result.

 

Very easy if you look at SelectCell what i mean?

 

I was wondering there was ONLY FirstVisibleRow.

 

Hope now we think the same :)

 

See first post:

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

etc.

 

If you look at NextGrid.SelectFirst(); you always assume that the first column is visible / Selected. See you code:

procedure TNxCustomGrid6.SelectFirst(Shift: TShiftState = []);
begin
  SelectCell(SelectedCol, FirstVisibleRow, Shift);
end;

But when using (SelectFullRow = True) then mostly SelectedCol = 0 and not valid if this column is NOT visible.
 

I am using the VirtualGrid! (TNextVirtualGrid6)


In Topic: FirstVisibleCol

06 June 2020 - 05:55 AM

Now I understand what you meant. I actually mean it simpler by just displaying the first visible column as a result.

Here's an example of how I see it:

function FirstVisibleCol: Integer;
begin
  Result := -1;
  for i := 0 to Pred(Columns.Count) do
  begin
    if Columns[i].Visible then Exit(i);
  end;
end;

FirstColInView maybe useful in future time.

Sorry for the misunderstanding. :wacko:


In Topic: FirstVisibleCol

05 June 2020 - 05:36 PM

Hi,

 

I see Update but not 'FirstVisibleCol' ?


In Topic: SelectionTextColor for Cell

16 May 2020 - 02:40 PM

:rolleyes: something went wrong Editing :blink: