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

Down

How to make the cursor constantly displayed in TEdit, TMemo Find similar branches


boa   (2002-03-19 06:54) [0]

There is TEdit (or TMemo) which describes some equation. There is also a TListBox which contains a list of variables, functions, etc. which may be present in the equation.
The task is that when selecting an entry in a TListBox, its contents are added to TEdit, at the position where the cursor is. But when TListBox is activated, naturally TEdit loses focus and the cursor does not display in it.
Question: how in this situation to ensure that the cursor is constantly displayed in TEdit?



ghost_by   (2002-03-19 07:43) [1]

so that the cursor is constantly displayed in TEdit - you process the OnClick event at the ListBox, do what you need, and then transfer the focus to your TEdit -> TEdit.SetFocus.

added to TEdit, to the position where the cursor is - TEdit "a has a property - SelStart - it and yuzay to determine the cursor position.



MBo   (2002-03-19 07:45) [2]

in the right places
ActiveControl: = Edit1;



boa   (2002-03-19 08:39) [3]

It doesn’t roll everything. I need to switch to TListBox, and the cursor does not disappear from TEdit!



panov   (2002-03-19 08:47) [4]

> boa © (19.03.02 08: 39)
The cursor is displayed on the element that is current (active) at the moment.
And this concept is the operating system.

So forget about what you wrote.



MBo   (2002-03-19 08:48) [5]

and you are insidious;)
you can not do it this way
as an alternative, I can suggest when Edit1 loses focus (onExit) to insert simulation | and tidy up when getting focus or using text



boa   (2002-03-19 08:51) [6]

In this case, there are no more questions!



Slonic   (2002-03-19 10:42) [7]

in fact, everything is very simple; everything is much simpler; those are nowhere simpler :)) edit1.selstart this is the position of the carriage, it is not necessary to always keep eating active :))
you can occasionally do setfocus him



boa   (2002-03-19 11:18) [8]

> Slonic
The problem is not finding the carriage position in Edit, but would like to see, when selecting the ListBox entry "a, into which position of the line Edit" a the selected record will be inserted (equation is long).
I find a rational suggestion MBo, and probably will do so.



boa   (2002-03-19 11:21) [9]

Yes, I completely forgot - Thank you all!

PS
But if anyone else has any ideas, Budo is very grateful.



Pages: 1 whole branch

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

Top









Memory: 0.58 MB
Time: 0.021 c
1-155
SB.John
2002-03-21 12:47
2002.04.01
How to find out how much memory an object takes?


3-7
Malder
2002-03-05 19:23
2002.04.01
How to cancel a transaction in a trigger?


1-174
Dok_3D
2002-03-19 07:28
2002.04.01
Large XML files


3-2
Yakudza
2002-03-05 13:27
2002.04.01
Invalid blob handle in record buffer


1-95
Nick_Torshin
2002-03-21 13:06
2002.04.01
Transferring a string from Delphi to VC ++





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 Español 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