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)
![Photo](http://www.gravatar.com/avatar/502cf85e01554ec69e55526d82d1883d?s=100&d=http%3A%2F%2Fwww.bergsoft.net%2Fforum%2Fpublic%2Fstyle_images%2Fmaster%2Fprofile%2Fdefault_large.png)
Ability to 'Not' have selected cell ...
Started by DbBanjo, Aug 20 2012 05:18 PM
TNextSheet SelectedCol SelectedRow
2 replies to this topic
#1
Posted 20 August 2012 - 05:18 PM
#2
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)
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
Posted 23 August 2012 - 02:35 AM
Hello,
I understand. I will then add your fix for next release.
Best regards
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.
--
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
NextSuite v5 - VCL Components (Previous version) →
NextGrid Component →
Bug reportStarted by David Wu, 07 Nov 2015 ![]() |
|
![]() |
||
NextSuite v5 - VCL Components (Previous version) →
NextGrid Component →
Nextgrid selectedrowStarted by luc, 03 Oct 2013 ![]() |
|
![]() |
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users