Page 1 of 1 1
Topic Options
#91098 - 2003-01-17 03:15 PM kixforms - how to Copy TextBox contents ´without selecting them ?
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
means :

a button 'Copy' takes the entire content of TextBox and copies it to clipboard ... something with .SelStart .SelLength or .SelText I bet
_________________________



Top
#91099 - 2003-01-17 03:37 PM Re: kixforms - how to Copy TextBox contents ´without selecting them ?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
what was that new shiny copy() ?
_________________________
!

download KiXnet

Top
#91100 - 2003-01-17 03:41 PM Re: kixforms - how to Copy TextBox contents ´without selecting them ?
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
just $Textbox.Copy , but the selection is giving me headaches
_________________________



Top
#91101 - 2003-01-17 04:09 PM Re: kixforms - how to Copy TextBox contents ´without selecting them ?
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Cappy - might try this:

code:
Function Button_Click
$TextBox.SelStart = 0
$TextBox.SelLength = -1
$TextBox.Copy
EndFunction

Im getting that coffee'd out fuzzy feeling again buddy [Frown]

Top
#91102 - 2003-01-17 04:27 PM Re: kixforms - how to Copy TextBox contents ´without selecting them ?
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
You told us that you were just heading of to get a coffee with your boss ... again coffeed out ?

You have a severe caffeeine addiction [Wink]

Thanks for the hint !
Told me once I think but forgot about that -1 thing

J
_________________________



Top
#91103 - 2003-01-17 04:29 PM Re: kixforms - how to Copy TextBox contents ´without selecting them ?
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
ummm ... that doesn't copy to clipboard ???

code:
function btnCopy_Click()
$txtTarget.SetFocus
$txtTarget.SelStart = 0
$txtTarget.SelLength = -1
$txtTarget.SelText = $txtTarget.Text
$txtTarget.Copy
endfunction

_________________________



Top
#91104 - 2003-01-17 04:30 PM Re: kixforms - how to Copy TextBox contents ´without selecting them ?
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
d'oh !

just forgot to take out the test brain farts

($txtTarget.SelText = $txtTarget.Text)

works nicely now !!

[ 17. January 2003, 16:31: Message edited by: jpols ]
_________________________



Top
#91105 - 2003-01-17 04:43 PM Re: kixforms - how to Copy TextBox contents ´without selecting them ?
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
You had me worried there for a sec. I was testing like crazy over here because I thought you needed that statement in there. Phew! - back to RadioButton debugging then.
Top
#91106 - 2003-01-17 04:48 PM Re: kixforms - how to Copy TextBox contents ´without selecting them ?
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Looks even nicer (the Box only flashes for a moment) if one leaves out the SetFocus ... otherwise one sees the Text selected, lets see which I (and probably Lonkero from tomorrow on) use for it ...

Oh Yeah ... the Radio button bug, a real pain eh ?
_________________________



Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1607 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.063 seconds in which 0.039 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org