AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein GUI-Design mit VCL / FireMonkey / Common Controls Delphi TMemo: Zeilenindex der Cursorposition ermitteln
Thema durchsuchen
Ansicht
Themen-Optionen

TMemo: Zeilenindex der Cursorposition ermitteln

Ein Thema von little-x · begonnen am 18. Mai 2007 · letzter Beitrag vom 18. Mai 2007
Antwort Antwort
Klaus01

Registriert seit: 30. Nov 2005
Ort: München
5.782 Beiträge
 
Delphi 10.4 Sydney
 
#1

Re: TMemo: Zeilenindex der Cursorposition ermitteln

  Alt 18. Mai 2007, 13:14
Aus der Hilfe:

Zitat:
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.

Zitat:
Read SelStart to determine the position of the first selected character, where 0 indicates the first character. If there is no selected text, SelStart indicates the position of the cursor. Set SelStart to remove the current selection and position the cursor just before the indicated character.

To select a particular range of the text, first set SelStart to position the cursor, and then set SelLength to extend the selection.
Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:43 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz