Hello all
In delphi, the TListView has an OnChanging event which is fired at the start of editing to see if the editing should be allowed. This event does not exist in the LCL version so I thought I would have a go at adding it.
I tried subclassing it ( in one of my project files )
TLVChangingEvent = procedure (Sender: TObject; Item: TListItem;
Change: TItemChange; var AllowChange: Boolean) of object;
TTLListView = class(TListView)
private
FOnChanging: TLVChangingEvent;
protected
property OnChanging: TLVChangingEvent read FOnChanging write FOnChanging;
end;
but this did not work, so I assume that I need to change the source in the LCL.
However I am a bit ( well, a lot really
) hazy about how the events are triggered. I have read the various wiki pages on widget writing but am no wiser. Can someone point me to any further resources so I can have a go at it over the holiday.
I suppose that it may not be possible to add this event, in which case I will have to do a work-around, so that will be useful to know as well.
Regards
Tim