Subject RowSelect again, was Re: Help File
Author dmarmur2002
I don't think dataset-row-selection has anything to do with this. No,
second thought, I'm posetively shure it's a different beast. Mixing it
into this thread confuses things. There is no place in the source
where the two concepts touch. Granted that RowSelect might have been
implemented to aid/enhance usage of dataset-row selection but that is
academic.

RowSelect appears in places where drawing is concerned as you can see
by some simple test. It also appears in places where navigation is
concerned. The idea seems to be having a grid behave as if it only has
one column when there is in fact several. Home will not home the row
but the entire grid, right key (VK_RIGHT) goes to the next row instead
of the next column, and so on and so forth. This also affects mouse
actions because keys and mouse clicks call common functions (IMO
logical and correct).

Anyway, to really understand the idea behind this you'll either have
to analyze the source thorougly or ask Jason. I'd go with the latter.

There is one place, however, that could maybe shed some light. When
you set RowSelect the ancestor TGrid's options are changed accordingly.

This is from "Delphi Object and Component Reference", "TGridOption,
TGridOptions type":

"goRowSelect Entire rows are selected rather than individual cells. If
goRowSelect is included in Options, goAlwaysShowEditor has no effect."

Perhaps a google on goRowSelect might give somehting. But I thing
there must be hundreds of properties and options that almost never got
used ;)

That was my last cents in this thread.

So... Andy - go draw!

/Dany

Sorry, couldn't keep my hands off that last one...

--- In IBObjects@yahoogroups.com, "andygarneruk" <andy@g...> wrote:
>
> --- Andy Garner wrote:
> > Thanks both for the helpful feedback. However I'm still stuck on the
> > effect of RowSelect.
> > RowSelect does more than "makes the whole selected row appear
> > highlighted or not" (IBO help file) but I'm unable to fathom out
> > what that is. Does anyone have a little more time to spend on the
> > case with me please?
>
>
> --- Helen Borrie wrote:
> > I'm actually struggling to understand what you need. RowSelect
> > really doesn't do much at all.
> >
> > All I've ever known RowSelect to do is switch on or off the
> > standard Windoze grid highlighting behaviour with respect to
> > selecting multi-row subsets from within your set. So if is true,
> > then the user will be able to hold the shift or ctrl key
> > and then select away using the mouse.
> >
>
> Thanks Helen for taking up the case. All I was looking for was to
> highlight the current grid row (dark blue is fine), rather than
> relying on the arrow head indicator (from IndicateRow). Users say
> highlighting makes the current row more obvious. RowSelect seemed to
> be the ideal property for this (IBO help = "This property makes the
> whole selected row appear highlighted or not") and indeed it does
> have that effect. (I think it is IndcateSelected that gives the muti-
> select capability?).
>
> But users reported an undesirable side effect of RowSelect, which was
> the subject of my initial post:
>
> > When a datasource has more columns than a grid can display,
> > the user can scroll the columns horizontally to bring the right
> > most columns into view.
>
> > When RowSelect = True however, simply clicking a cell in one of
> > these normally out of view columns causes the grid to cancel the
> > horizontal scroll and display column 1 in the left most position.
>
> > How can I have the grid retain the active column in view please?
>
> The feedback from the group here (Danny) was:
>
> > RowSelect does not just make the row appear selected, it changes
> > the behaviour of Home/End and such and navigation on the whole.
>
> So my question is: is RowSelect intended to simply paint, or does it
> have some additional and undocumented purpose which is resulting in
> the scrolling being cancelled?
>
> I appreciate I can do my own painting to get the effect I want, but
> at the moment that's not my main concern. I think it far preferable
> that we clarify the intention of the RowSelect property and establish
> if it does indeed do that. If I can then contribute a sentence or two
> to that property's explanation in the source/help file I will feel
> our time here has been to good effect.
>
> Thanks, Andy.
>