في System.Windows.Forms.RichTextBox، وكيفية تحويل من LINENUMBER إلى موضع الحرف؟

StackOverflow https://stackoverflow.com/questions/1434660

  •  07-07-2019
  •  | 
  •  

سؤال

وأود العكس من <لأ href = "http://msdn.microsoft.com/en-us/library/system.windows.forms.richtextbox.getlinefromcharindex(VS.85).aspx" يختلط = " نوفولو noreferrer "> RichTextBox.GetLineFromCharIndex ()

ولدي رقم السطر وأريد أن استرداد مؤشر شار لذلك السطر. يمكن تسميته طريقة RichTextBox.GetCharIndexFromLine().

هل من الممكن، ببساطة؟

هل كانت مفيدة؟

المحلول

richTextBox1.GetFirstCharIndexFromLine(int lineNumber)

نصائح أخرى

نعم، فإن هذه الطريقة RichTextBox.GetFirstCharIndexFromLine (LINENUMBER)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top