|
Home > Archive > Programming with dBASE > October 2005 > <object>.keyBoard() Function
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
<object>.keyBoard() Function
|
|
| Jeffrey W. Harris 2005-09-27, 8:23 pm |
| Challenge with creating a generic routine that will allow me to set text into a editor object but have special character, such as the astrick (*), that would indicate to the user they can place "other" text in this location. I'm trying to have a PUSHBUTT
ON object that searches the form.activeControl for a object type and then find the astrick (*) and then move the cursor to that location, then delete the astrick (*) and then wait for the user to input text, either by typing OR having a way to add blubs o
f text from a listbox that shows only a quick word that "blows up into a full or partiial sentence." When I use the command form.activeControl.keyboard("{Tab}") or any other "special function" strange characters will appear in addition to what the action
should have occurred. The following is a EXAMPLE that I'm working on but challenged and fast approaching a deadline. Help!
function SMCCAPPSPUSHBUTTON13
_onClick
if form.activeControl.className = "SMCCAPPSENTRYFIELD"
mNextStop = at("*", form.activeControl.value, 1)
if mNextStop = 0
form.activeControl.keyboard("{Tab}")
if form.activeControl.className = "SMCCAPPSEDITOR"
form.activeControl.keyboard("{Ctrl+PgUp}")
form.activeControl.keyboard("{Home}")
endif
else
form.activeControl.keyBoard("{Home}")
for i = 1 to mNextStop - 1
form.activeControl.keyBoard("{RightArrow}")
next
form.activeControl.keyBoard("{Del}")
endIf
else if form.activeControl.className == "SMCCAPPSEDITOR"
form.activeControl.keyboard("{Ctrl+PgUp}")
form.activeControl.keyboard("{Home}")
form.activeControl.keyBoard("~")
mCursorAt = at("~", form.activeControl.value, 1)
form.activeControl.keyboard("{Back}")
mNextStop = at("*", form.activeControl.value, 1)
if mNextStop = 0
form.activeControl.keyBoard("{Tab}")
if form.activeControl.className == "SMCCAPPSEDITOR"
keyboard "{Ctrl+PgUp}"
endif
else
if mCursorAt < mNextStop
for i = mCursorAt to mNextStop - 1
if substr(form.activeControl.value, i, 1) <> chr(10)
form.activeControl.keyBoard("{RightArrow}")
mNextStop = mNextStop - 1
endIf
next
form.activeControl.keyBoard("{Del}")
else
for i = mNextStop to mCursorAt - 1
if substr(form.activeControl.value, i, 1) <> chr(10)
form.activeControl.keyboard("{LeftArrow}")
mCursorAt = mCursorAt + 1
endIf
next
form.activeControl.keyBoard("{Del}")
endIf
endIf
else
keyboard "{Tab}"
endIf
return
ANY response or suggestions are appreciated, as I have found in the past that I may type to much information and scare away viewers from any further input on their part.
Thanks
Jeffrey
| |
| Ronnie MacGregor 2005-10-07, 3:26 am |
| In article <ueei6n6wFHA.1044@news-server>, jharris@smcclinic.com says...
> move the cursor to that location, then delete the astrick (*)
> and then wait for the user to input text, either by typing OR
> having a way to add blubs of text
Hi Jeffrey
There is a beta HTMLeditor control posted at my dBASE site which does
some of what you describe. Feel free to pull out the relevant bits of
code and make use of them if it helps.
http://www.dbasedeveloper.co.uk/rmH...mHTMLeditor.htm
--
Ronnie MacGregor
Scotland
|
|
|
|
|