Ins from ClipBoard to Xbrowse

Ins from ClipBoard to Xbrowse

Postby Silvio.Falconi » Tue Oct 29, 2024 12:27 pm

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 view

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
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ins from ClipBoard to Xbrowse

Postby nageswaragunupudi » Tue Oct 29, 2024 1:47 pm

Set
Code: Select all  Expand view
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 view
#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
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Ins from ClipBoard to Xbrowse

Postby Silvio.Falconi » Wed Oct 30, 2024 7:40 am

nageswaragunupudi wrote:Set
Code: Select all  Expand view
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 view
#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
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ins from ClipBoard to Xbrowse

Postby Marc Venken » Wed Oct 30, 2024 8: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: Select all  Expand view

#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.04 with Harbour
User avatar
Marc Venken
 
Posts: 1434
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Ins from ClipBoard to Xbrowse

Postby Silvio.Falconi » Wed Oct 30, 2024 9: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: Select all  Expand view

#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 view
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
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ins from ClipBoard to Xbrowse

Postby Marc Venken » 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.04 with Harbour
User avatar
Marc Venken
 
Posts: 1434
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Ins from ClipBoard to Xbrowse

Postby nageswaragunupudi » 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: Select all  Expand view
  if ::aSizeRect != nil
      ::CalcSize()
      return nil
   endif
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Ins from ClipBoard to Xbrowse

Postby nageswaragunupudi » Wed Oct 30, 2024 3: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


Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Ins from ClipBoard to Xbrowse

Postby Silvio.Falconi » 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


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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 27 guests