insert label of a btn at cursors place in a field
Klaus Major
klaus at major-k.de
Sun Jul 17 05:31:42 CDT 2005
Hi Reinhold :-)
> Hello!
>
> I want to insert the label of a btn at the place of the cursor in a
> fld
>
> - put the label of btn "xyz" into fld "abc"
>
> deletes the existing content of the fld. But I only want to add it.
>
> What is the right way?
you can check where the cursor position in a field is with:
-> the selectedchunk
1. When there is no selection OR no field has the focus!
"the selectedchunk" will be EMPTY.
2. When there is some text selected it will return something like:
put the selectedchunk
-> char 2 to 10 of field 1
In this case you can decide if you want to overwrite the selection of
not...
3. When there is NO text selected, but the cursor IS in a field, it
will return:
put the selectedchunk
-> char 11 to 10 of field 1
Please not that in this case:
word 4 of the selectedchunk < word 5 of the selectedchunk
(HINT, HINT ;-)
In this case (3) you can do:
...
word 4 of the selectedchunk < word 5 of the selectedchunk
put word 4 of the selectedchunk into einfueg1
put word 5 of the selectedchunk into einfueg2
if einfueg1 < einfueg2 then
put the label of btn "xyz" after char einfueg of fld "abc"
end if
...
So you can decide what and when to do within some if then statements :-)
(Sach' Bescheid, wenn Du das alles in deutsch brauchst ;-)
> Thanks
> Reinhold
Best
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the metacard
mailing list