--- Mariano <[EMAIL PROTECTED]> escribió:

> Excuse the following, maybe is impertinent, but i think is
> necessary... I'm
> a newbie in open source projects, but i think not in Delphi :-)
> 
> Hi! i'm programming some application with the TStringGrid, but, I
> found some
> issues that i think must be officially modified(Because in my
> sources they
> are) ...
> * First, i found that the F2 Key can't be analyzed in the event
> OnKeyDown...
> because it's used internally to begin the Edit Mode in the grid...
> But... if
> i want to use this key for another things, why i cant!? I think
> that The F2
> Key must be Analyzed after calling the OnKeyDown event...

What you mean that you can't?, once that you have handled the key in
OnKeyDown and then set Key:=0, the normal behaviour should be then
overrided, or maybe I'm misunderstanding something?.

> * Second, In the event OnBeforeSelection, the arguments Row and
> Col, brings
> the Row and Col of the New position... but, is it Useful? Because,
> what is
> the difference between OnSelectCell and OnBeforeSelection? I think
> is better
> if they brings the Row and Col of the old position, to make some
> validation
> work...
> 
> thanks!
> 

SelectCell, which calls OnSelectCell for TCustomDrawGrid and
derivates allows you to test if a given cell can be selected if the
answer is no, no movement is done or the cell is skipped. The col,row
arguments are the new position if you want to access the old position
well, that's the current one so grid.row, grid.col will do it.

If you handle OnBeforeSelection you know for sure that the selection
will be taking place, it's like a "ok it will be moving, do you want
to do something before that?", the arguments are the new col and row
if you want to access the old ones, then use grid.col, grid.row

If you want, sendme a sample which works in Delphi and not in Lazarus
and I will try to rewrote things if necessary or I will give you an
alternative way.

Jesus Reyes A.


        
        
                
___________________________________________________________ 
Do You Yahoo!? 
La mejor conexión a Internet y <b >2GB</b> extra a tu correo por $100 al mes. 
http://net.yahoo.com.mx 

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to