Ins from ClipBoard to Xbrowse

Post Reply
User avatar
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Ins from ClipBoard to Xbrowse

Post by Silvio.Falconi »

I have this xbrowse

Image


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


sample of file on memory clipboard

Code: Select all | Expand

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 November 2023 - January 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
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Ins from ClipBoard to Xbrowse

Post by nageswaragunupudi »

Set

Code: Select all | Expand

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: Select all | Expand

#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
Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Ins from ClipBoard to Xbrowse

Post by Silvio.Falconi »

nageswaragunupudi wrote:Set

Code: Select all | Expand

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: Select all | Expand

#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
Image

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

Image



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

Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Marc Venken
Posts: 1485
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Ins from ClipBoard to Xbrowse

Post by Marc Venken »

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: Select all | Expand

#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
User avatar
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Ins from ClipBoard to Xbrowse

Post by Silvio.Falconi »

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: Select all | Expand

#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: Select all | Expand

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 November 2023 - January 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
User avatar
Marc Venken
Posts: 1485
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Ins from ClipBoard to Xbrowse

Post by Marc Venken »

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
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Ins from ClipBoard to Xbrowse

Post by nageswaragunupudi »

the last xbrowse release make error asizerect I sent you a mail
Please delete these 4 lines in the method checksize()

Code: Select all | Expand

   if ::aSizeRect != nil
      ::CalcSize()
      return nil
   endif
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Ins from ClipBoard to Xbrowse

Post by nageswaragunupudi »

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
Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Ins from ClipBoard to Xbrowse

Post by Silvio.Falconi »

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
Image
with xbrowse last release run ok
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
Post Reply