lukaszinf Posted May 13, 2006 Report Share Posted May 13, 2006 jak zrobić w w jednym z paneli w StatusBar1 aby w nim wyświetliło mi sie takie coś np. 1 : 10 gdzie jeden to numer linii a 10 to pozycja kursora od początku jednej z lini Link to comment Share on other sites More sharing options...
Iskar Posted May 13, 2006 Report Share Posted May 13, 2006 Było, szukaj! Ech.. CaretPos + F1 Link to comment Share on other sites More sharing options...
Toster Posted May 15, 2006 Report Share Posted May 15, 2006 [code=Delphi] procedure TmainForm.GetRichCursor; var lNumber, lChar,[[YBY[B[XHXY]TTe$4\"&6VFB6V7F'B6$6VCŁ&6AĄ5}1%9%9`ą94(ą ĄIĄdit.SelStart- lCharCount; sbRich.Panels[0].Text:= IntToSt[X JH ĘB[\"rrEF7G\"&6VFMąMŃ4)4 [/code] Always Dark<br /> Link to comment Share on other sites More sharing options...
lukaszinf Posted May 15, 2006 Author Report Share Posted May 15, 2006 właśnie też to znalzłem ale [b]niewiem gdzie to wstawić? Link to comment Share on other sites More sharing options...
Budrys Posted May 15, 2006 Report Share Posted May 15, 2006 Możesz to wstawić albo w Timerze (nie polecam), albo wstawić komponent ApplicationEvents1 i tam w Events w procedurze OnIdle Link to comment Share on other sites More sharing options...
lukaszinf Posted May 15, 2006 Author Report Share Posted May 15, 2006 coś mi [b]zabardzo nie działa czy moze ktoś ten kod skopiować tu na forum w takiej postaci ApplicationEvents1 i tam w Events w procedurze OnIdle cały kod programu (przykładu) Link to comment Share on other sites More sharing options...
Budrys Posted May 15, 2006 Report Share Posted May 15, 2006 lol! wstawiasz na formę komponent ApplicationEvents i w inspektorze obiektów wybierasz Events. Potem szukasz pozycji OnIdle, i klikasz dwukrotnie w komórce obok OnIdle po prawej stronie. Potem usuwasz z nowopowstałej procedury [code=Delphi] begin,$ł;hui'var lNumber, lChar, lCharCount: integer; begin lNumbeHXY]JSWÓSQÓPTXY][6$6VCŁ&6VFBW&f&TTDUV&W\"4(ą ĄIĄMąMŃą Ą 4(IAnels[0].Text:= IntToStr(lNumber + 1) +':'+ [ JH BEF7G\"&6VFB6V7F'B*h)ĄĘ;r-jH^bpw&6VGW&RĆ6FWfVG3FĆRÓÓGWF6bćREź4)4(ą9ą Ąą Ą Ń4) lNumber := RichEdit.Perform(EM_LINEFROMCHAR, RichEdit$[ NB[HXY]JSWÓSRSVV&W\"6\"Ł&6VFB6V7F'B6$6VCIAąltQ%ŃQMŃĄą9ŹŹŹ4( IntToStr(lChar + 1) +' ' + ([XY][ NB[ [/code] Link to comment Share on other sites More sharing options...
Toster Posted May 16, 2006 Report Share Posted May 16, 2006 a nie latwiej podpiac to w OnChange i OnMouseUp w RichEdit ? Always Dark<br /> Link to comment Share on other sites More sharing options...
KKKas Posted May 16, 2006 Report Share Posted May 16, 2006 I jeszcze OnKeyPress. ҉ Link to comment Share on other sites More sharing options...
Budrys Posted May 16, 2006 Report Share Posted May 16, 2006 OnChange chyba jest wywoływane również podczas OnKeyPress, OnMouseUp Link to comment Share on other sites More sharing options...
KKKas Posted May 16, 2006 Report Share Posted May 16, 2006 [quote] OnChange chyba jest wywoływane również podczas OnKeyPress, OnMouseUp [/quote]OnChange wywoływane jest gdy coś napiszesz, wkleisz itd.Czyli podsumowując: należy uaktualniać pozycję kursora w OnMouseDown i OnKeyDown. ҉ Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.