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


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!

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];


Memory: 0.57 MB
Time: 0.018 c
Alexey A
2002-03-19 21:41

2002-03-07 06:34
Grant per column

2001-12-27 09:44

2002-03-19 02:17
String parser

2002-02-19 13:54
--- | The branch was untitled | ---

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
English French German Italian Portuguese Russian Spanish