Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

How to work with TInplaceEdit Find similar branches


Tosov   (2001-12-15 10:43) [0]

How to "connect" it to StringGrid and generally work with it (if you can a small example)



Tosov   (2001-12-15 22:10) [1]

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) [2]

Really needed !!!



Suntechnic   (2001-12-16 05:28) [3]

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) [4]

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) [5]

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) [6]

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) [7]

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) [8]

> 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) [9]

Suntechnic
Thank. I'll try to do so ..



Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top





Memory: 0.57 MB
Time: 0.025 c
3-21897
Maxb
2001-11-27 14:33
2002.01.08
DBMS Cache


1-22082
Chak
2001-12-19 10:07
2002.01.08
How to pass a function parameter in a DLL.


4-22478
Ross
2001-08-28 16:53
2002.01.08
Start Menu


1-22106
Andrey196
2001-12-19 18:24
2002.01.08
Sorry for the lamer question how to print image


1-22026
Romualds stashans
2001-12-18 11:07
2002.01.08
How can Delphi run * .exe with ....





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian Japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Spanish swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada Khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish