Thread: Clipboard
View Single Post
  #5 (permalink)  
Old 09-10-2007, 02:38 PM
Rioven Rioven is offline
Senior Member
 
Join Date: May 2007
Posts: 130
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi,
I've tried using hardware.SetClipBoardData, hardware.GetClipBoardData and formlib context menu for "cut/copy/paste/Select All" function on a textbox1.
but SetClipBoardData and GetClipBoardData return the whole text of textbox1 to textbox2 while I've only selected portion of text.

I've followed the help samples.
Can you help me on this?

PHP Code:

Sub App_Start

hrdwr01
.new1 ' a Hardware object.
hrdwr01.SetClipboardData(Textbox1.Text)

formlib1.New1("form1"",B4PObject(1)) 

      Context1.New1
      Context1.AddItem("Cut")
      Context1.AddItem("Copy")
      Context1.AddItem("Paste")
      Context1.AddItem("Delete")
      Context1.AddItem("-") '
Adds a separator
      Context1
.AddItem("Select All")

      
formlib1.AddContextMenu("Textbox1",Context1.Value)
End Sub

Sub context1_click
Select context1
.SelectedText
Case "Cut"
textbox2.text=hrdwr01.GetClipboardData
Case "Copy"
Case "Paste"
Case "-"
Case "Select All"
End Select
End Sub 
What other things I've missed?
__________________
Rioven

Sony Ericsson XPERIA X1i WM6.1
480x800 Display Resolution
with QWERTY keyboard
Reply With Quote