FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Ins from ClipBoard to Xbrowse
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Ins from ClipBoard to Xbrowse
Posted: Tue Oct 29, 2024 12:27 PM
I have this xbrowse




and I wish insert from clipbard into cell of browse , So how I can Make


sample of file on memory clipboard
Code (fw): Select all Collapse
88  59  5   46  44
48  88  20  50  26
83  10  86  27  78
85  42  87  4   19
13  6   49  4   8
87  20  5   84  33
66  37  28  16  50
71  62  5   87  66
86  24  8   59  58
14  31  37  5   76
83  11  2   39  47
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Ins from ClipBoard to Xbrowse
Posted: Tue Oct 29, 2024 01:47 PM
Set
Code (fw): Select all Collapse
oBrw:nEditTypes := EDIT_GET
oBrw:lCanPaste := .t.
But the text in clipboard should be TAB delimited text.
XBrowse Paste works just like pasting into Excel.

Sample:
Code (fw): Select all Collapse
#include "fivewin.ch"

function Main()

   AEval( aData, { |aRow,i| aRow[ 1 ] := Replicate( Chr( 64+i ), 4 ) } )
   XBROWSER aData SETUP ( oBrw:nEditTypes := EDIT_GET, oBrw:lCanPaste := .t. )

return nil
Regards



G. N. Rao.

Hyderabad, India
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: Ins from ClipBoard to Xbrowse
Posted: Wed Oct 30, 2024 07:40 AM
nageswaragunupudi wrote:Set
Code (fw): Select all Collapse
oBrw:nEditTypes := EDIT_GET
oBrw:lCanPaste := .t.
But the text in clipboard should be TAB delimited text.
XBrowse Paste works just like pasting into Excel.

Sample:
Code (fw): Select all Collapse
#include "fivewin.ch"

function Main()

   AEval( aData, { |aRow,i| aRow[ 1 ] := Replicate( Chr( 64+i ), 4 ) } )
   XBROWSER aData SETUP ( oBrw:nEditTypes := EDIT_GET, oBrw:lCanPaste := .t. )

return nil

here not work
the last xbrowse release make error asizerect I sent you a mail


it run only if I create a txt.txt and Import on Excel then the paste command on xbrowse run ok as you can see on this picture





But I wish copy from a websiste I explain you
I created the procedure for automatic updating from a particular website and it works well, but it is possible that in one day this address is changed or it no longer works (like all the free services that are disappearing) so the user will be forced to enter the extractions manually or copy them from a website

If the user wants to copy the extracts from a website, highlight the extracts on the website and then copy them into xbrowse

sample try - on https://www.estrazionedellotto.it/

I tried but not work

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: Ins from ClipBoard to Xbrowse
Posted: Wed Oct 30, 2024 08:44 AM
Silvio,

With the changed program from Mr. Rao I was able to copy/paste from the site into Xbrowse directly.
The local aData was missing for the test.
Code (fw): Select all Collapse
#include "fivewin.ch"

function Main()
  local aData:={{"","","","",""},{"","","","",""},{"","","","",""},{"","","","",""},{"","","","",""}}

   AEval( aData, { |aRow,i| aRow[ 1 ] := Replicate( Chr( 64+i ), 4 ) } )
   XBROWSER aData SETUP ( oBrw:nEditTypes := EDIT_GET, oBrw:lCanPaste := .t. )

return nil
Marc Venken

Using: FWH 23.08 with Harbour
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: Ins from ClipBoard to Xbrowse
Posted: Wed Oct 30, 2024 09:51 AM
Marc Venken wrote:Silvio,

With the changed program from Mr. Rao I was able to copy/paste from the site into Xbrowse directly.
The local aData was missing for the test.
Code (fw): Select all Collapse
#include "fivewin.ch"

function Main()
  local aData:={{"","","","",""},{"","","","",""},{"","","","",""},{"","","","",""},{"","","","",""}}

   AEval( aData, { |aRow,i| aRow[ 1 ] := Replicate( Chr( 64+i ), 4 ) } )
   XBROWSER aData SETUP ( oBrw:nEditTypes := EDIT_GET, oBrw:lCanPaste := .t. )

return nil

Marc the adata is an empty array

If I copy this text on excel
Code (fw): Select all Collapse
88  59  5   46  44
48  88  20  50  26
83  10  86  27  78
85  42  87  4   19
13  6   49  4   8
87  20  5   84  33
66  37  28  16  50
71  62  5   87  66
86  24  8   59  58
14  31  37  5   76
83  11  2   39  47
and the make Copy and paste run ok on Xbrowse

If I copy the text from a websiste and I try to paste on Xbrowse it not work I pressed Crtl+V to paste
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: Ins from ClipBoard to Xbrowse
Posted: Wed Oct 30, 2024 11:00 AM

Version 23.07

Here it works.

You have to give the cell focus and then past. Don't enter the cell and try to paste.

I noticed that when you give focus to the top/left cell and paste, all cells and rows are pasted.

The array don't need all the rows, but the columns it does. Xbrowse appends automaticaly the folowing rows (Smart xBrowse Mr. Rao ....)

Marc Venken

Using: FWH 23.08 with Harbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Ins from ClipBoard to Xbrowse
Posted: Wed Oct 30, 2024 12:32 PM
the last xbrowse release make error asizerect I sent you a mail
Please delete these 4 lines in the method checksize()
Code (fw): Select all Collapse
   if ::aSizeRect != nil
      ::CalcSize()
      return nil
   endif
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Ins from ClipBoard to Xbrowse
Posted: Wed Oct 30, 2024 03:50 PM
But I wish copy from a websiste I explain you
I created the procedure for automatic updating from a particular website and it works well, but it is possible that in one day this address is changed or it no longer works (like all the free services that are disappearing) so the user will be forced to enter the extractions manually or copy them from a website

If the user wants to copy the extracts from a website, highlight the extracts on the website and then copy them into xbrowse

sample try - on https://www.estrazionedellotto.it/

I tried but not work
Regards



G. N. Rao.

Hyderabad, India
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: Ins from ClipBoard to Xbrowse
Posted: Thu Oct 31, 2024 11:01 AM
nageswaragunupudi wrote:
But I wish copy from a websiste I explain you
I created the procedure for automatic updating from a particular website and it works well, but it is possible that in one day this address is changed or it no longer works (like all the free services that are disappearing) so the user will be forced to enter the extractions manually or copy them from a website

If the user wants to copy the extracts from a website, highlight the extracts on the website and then copy them into xbrowse

sample try - on https://www.estrazionedellotto.it/

I tried but not work
with xbrowse last release run ok
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion