Jump to content


Photo

Ability to 'Not' have selected cell ...

TNextSheet SelectedCol SelectedRow

  • Please log in to reply
2 replies to this topic

#1 DbBanjo

DbBanjo
  • Members
  • 26 posts

Posted 20 August 2012 - 05:18 PM

Howdy,

Within TNextSheet, is there a method of 'Not' having a selected cell?
For example, I wish to have a small TNextSheet for display only & I don't
wish to have a cell visually marked as a Selected cell (ie: either no value
for SelectedCol & SelectedRow or the ability to ignore these values).

Thanks,

DbBanjo (Marc Bolen)

#2 DbBanjo

DbBanjo
  • Members
  • 26 posts

Posted 20 August 2012 - 07:58 PM

Howdy,

Update: In doing a bit of debugging through NxSheet.Pas,
I discovered the simpliest method of solving my prob. is as
follows:

procedure TNextSheet.Paint;
var
r: TRect;
begin
inherited;
r := GetSheetRect;
ExcludeClipRect(Canvas.Handle, r.Left, r.Top, r.Right, r.Bottom);
PaintBackground;
SetClipRect(Canvas, ClientRect);
if soHeadings in FOptions
then PaintHeadings;
if (ColCount > 0) and (RowCount > 0) then
begin
PaintCells;
If Enabled Then
DrawRangeSelection;
if stEditing in FSheetState then
FInplaceEdit.Paint;
end;
end; // TNextSheet.Paint

Basically, within the above, I've tied the Enabled property of a
TNextSheet to it's default action of painting the cell containing
it's SelectedRow & SelectedCol properties (line in bold above).

My reasoning for the above is my belief of the fact a disabled
TNextSheet (or any similar comp.) shouldn't be displaying a selected
"anything" (ie: it gives the user the false feeling they are able to
move through and\or alter the contents of the TNextSheet).

I'm more than open to alt. approaches\ideas for the above ...

Thanks,

DbBanjo (Marc Bolen)

#3 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 23 August 2012 - 02:35 AM

Hello,

I understand. I will then add your fix for next release.

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.





Also tagged with one or more of these keywords: TNextSheet, SelectedCol, SelectedRow

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users