Current archive: 2002.01.08;
How to work with TInplaceEdit Find similar branches← →
Tosov (2001-12-15 10:43) 
How to "connect" it to StringGrid and generally work with it (if you can a small example)
Tosov (2001-12-15 22:10) 
And yet - in the help it says that there is TCustomGrid.InplaceEditor TCustomGrid.CreateEditor and others. And his descendant TStringGrid does not have them.
Help deal with InplaceEdit. Very necessary !!!
Tosov (2001-12-16 00:10) 
Really needed !!!
Suntechnic (2001-12-16 05:28) 
You better tell me, do you write your component based on TStringGrid or TCustomGrid or just want to get there? In the second case, nothing. Must be inherited ...
Suntechnic (2001-12-16 05:47) 
Sorry, I didn’t immediately find the question you asked for the first time. Now essentially ...
TCustomGrid has a CreateEditor method. You need to redefine it. In order to get full control over TInplaceEdit you also have to inherit from it. Those. write your TInplaceEdit for example TInplaceEditEx And in the redefined method CreateEditor create a new TInplaceEditEx.
Tosov (2001-12-16 07:09) 
I write from TStringGrid (I just found the InplaceEditor in TCustomGrid, but I didn’t find it in StringGrid. And how do I work with it (TInplaceEdit.Grid is read-only :()
Suntechnic (2001-12-16 08:19) 
Now I don’t understand ... Have you ever heard of inheritance? TStringGrid is an inheritor from TCustomGrid, which means that everything that TCustomGrid has is present in TStringGrid and will be present in the class that you will spawn from TStringGrid ...
Tosov (2001-12-16 09:13) 
TStringGrid is an inheritor from TCustomGrid, which means that everything that TCustomGrid has is present in TStringGrid and will be present in the class that you will spawn from TStringGrid ...
I'm talking about the same thing. But where in TStringGrid InplaceEditor I did not find.
As I understand it, you suggest the following:
type TMyEdit = class (TInplaceEdit) public function Someone_onEndEdit (llll); override; end; Type TMyGrid = class (TStringGrid) public Editor: TMyEdit; CreateEditor; override; end; procedure TMyGrid.CreateEditor; begin Editor: = TMyEdit.Create (nil); end;
PS At TInplaceEdit "and Events are not present :( In general I was already confused
From the beginning .. On the form there is TMyGrid (from TStringGrid)
1. User starts editing a cell -> Data is transferred to Editor and processed there
2. User completes editing -> Data from Editor "a is transferred to the edited cell
3. All this is done "automatically" (I need to create an Editor and "attach" it to a specific component.
(as I understand it. if you make a mistake, correct it ..)
? How to say Editor "what is your grid = MyGird1 or how to create Editor in TMyGrid?
? Does the TInplaceEdit in the help have neither functions nor events related to the end of editing (maybe the help read poorly ??)?
Suntechnic (2001-12-16 18:58) 
> Tosov © (16.12.01 09: 13)
TMyGrid = class (TStringGrid) public Editor: TMyEdit; !!!!!!!!! Extra
Everything is true except for this line. Editor already exists, you just have to put yours there.
And create like this:
function TMyGrid.CreateEditor: TMyEdit; begin Result: = TMyEdit.Create (Self); end;
> TInplaceEdit in the help has neither functions nor events associated with ending> editing
And what prevents you from writing them? After all, you create your own class. This is a window anyway, and a window always gains focus and loses it.
... I didn’t come across the start and end of editing in InplaceEditor so I can’t see many stones, but I have to dig here ...
Tosov (2001-12-16 22:55) 
Thank. I'll try to do so ..
Pages: 1 whole branch
Current archive: 2002.01.08;
Memory: 0.57 MB
Time: 0.025 c