Benutzer-Werkzeuge

Webseiten-Werkzeuge


edit

Dies ist eine alte Version des Dokuments!


EDIT


zur allgemeinen Verwendung s. die Beschreibung zum Dialogeditor

Enthält das EDIT-Control bereits Text und soll weiterer Text an der Cursorposition eingefügt werden, ist dies mit der folgenden Prozedur möglich.

VBScript
'Fügt Text in ein Textfeld an Cursorposition ein Sub InsertInTextBox(sDlg, sControl, sText)

  Const EM_GETSEL = &H00B0
  Dim lPos
  Dim lSelStart
  Dim lSelEnd
  Dim sControlText
  lPos = CLng(FF_SendControl(sDlg, sControl, EM_GETSEL, 0, 0))
  lSelStart = lPos And &HFFFF&
  lSelEnd = (lPos \ &HFFFF&)
  sControlText = FF_GetControl(sDlg, sControl)
  FF_SetControl sDlg, sControl, Left(sControlText, lSelStart) & sText & Mid(sControlText, lSelEnd + 1)

End Sub

edit.1334423490.txt.gz · Zuletzt geändert: (Externe Bearbeitung)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki