Code completition

6 отговора 182 прегледа
#1

Code completition

zdr .nqkoy da znae kak da opredelq pozitziqta na markera ( vav RichEdit ili Memo) za da moga da popup prozoretza na code completition?

Отговор
в отговор на FxOOOO #2

Re: Code completition

Indicates the position of the caret in the client area of the memo.

property CaretPos: TPoint;

Description

Use CaretPos to determine the coordinates of the cursor. TPoint type defines a pixel location onscreen, with the origin in the top left corner. X specifies the horizontal coordinate of the point, Y specifies the vertical coordinate. CaretPos indicates the X and Y position relative to the client origin of the memo.

To determine the position of the caret in terms of characters of text only (rather than X/Y location), use the SelStart property.

by Waz Gaa
[email protected]
Отговор
в отговор на Waz Gaa #3

Re: Code completition

Da ama ne... nestava po toq na4in t.e opredelq mi na koy red sum i na koy simvol ot toq red, a na men ne mi trqbvat tezi koordinati

Отговор
в отговор на FxOOOO #4

Re: Code completition

Това извежда Popup под мишката. Ако ти помогне добре.
procedure TForm1.Memo1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
ScreenPoint:TPoint;
begin
ScreenPoint.x:=X;
ScreenPoint.y:=Y;
ScreenPoint:=Memo1.ClientToScreen(ScreenPoint);
PopupMenu1.Popup(ScreenPoint.x,ScreenPoint.Y+10);
end;

Отговор
в отговор на TRN #5

Re: Code completition

TRN , tova mi e qsno ,no na men ne mi vur6i rabota.

Отговор
в отговор на FxOOOO #6

Re: Code completition

!? Ili poziciqta na markera kakto az ti kazah ili poziciqta na kursora kakto TRN ti obqsni...

ako puk ti trqbva seleкцiqta : SelStart, SelLength, SelText svoistvata



by Waz Gaa
[email protected]
Отговор
в отговор на Waz Gaa #7

Re: Code completition

GetCaretPos
The GetCaretPos function copies the caret's position, in client coordinates, to the specifiedPOINT structure.

BOOL GetCaretPos(
LPPOINT lpPoint // address of structure to receive coordinates
);


i ako delfito polzwa standartnata karetka (a az na momenti si mislq che tiq ideoti i towa sa prenapisali za da e po drudno da se polzwa apito :)) poluchawash kakwoto iskash :)) btw obarni wnimanie che sha ti trqbwa clienttoscreen sled towa...

------------------------------
I got a COMPILER, and I'm not afraid to use it!
Отговор