FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Copy / Paste Behaviour
Posts: 253
Joined: Wed May 25, 2016 01:04 AM
Copy / Paste Behaviour
Posted: Mon Apr 25, 2022 01:29 AM

Hi, If I copy this caracters 01220036000106 and paste in another get I get this caracters 01220036000.
Any idea?

Thanks.

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Copy / Paste Behaviour
Posted: Mon Apr 25, 2022 07:35 AM

Add ES_AUTOHSCROLL style to the GET.

EMG

Posts: 253
Joined: Wed May 25, 2016 01:04 AM
Re: Copy / Paste Behaviour
Posted: Tue Apr 26, 2022 03:10 AM
Enrico Maria Giordano wrote:Add ES_AUTOHSCROLL style to the GET.

EMG


Perfect! Thanks Enrico!
Posts: 99
Joined: Mon Aug 09, 2010 11:00 AM
Re: Copy / Paste Behaviour
Posted: Tue Apr 26, 2022 06:13 AM

can i set this global for all gets
TX

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Copy / Paste Behaviour
Posted: Tue Apr 26, 2022 07:32 AM

No, as far as I know.

EMG

Posts: 99
Joined: Mon Aug 09, 2010 11:00 AM
Re: Copy / Paste Behaviour
Posted: Wed Apr 27, 2022 07:40 AM

Hmmmm

i have a lot of gets

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Copy / Paste Behaviour
Posted: Wed Apr 27, 2022 08:31 AM

Hello Uwe,
you could change the get function and link it in.
Best regards,
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Copy / Paste Behaviour
Posted: Wed Apr 27, 2022 08:38 AM

Dear Uwe,

Are all your GETs from resources or do you create them from source code ?

do you plan to modify all of them ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 99
Joined: Mon Aug 09, 2010 11:00 AM
Re: Copy / Paste Behaviour
Posted: Wed Apr 27, 2022 01:08 PM

All are from resources

The fiels have a space of 30 C but it cuts after 17

tx

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Copy / Paste Behaviour
Posted: Wed Apr 27, 2022 01:27 PM

So it should be easy with a find and replace operation.

EMG

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Copy / Paste Behaviour
Posted: Thu Apr 28, 2022 04:02 PM
For Gets created by code, Get class adds ES_AUTOHSCROLL style.
For Gets created from RESOURCE, Get class automatically adds ES_AUTOHSCROLL style if not already included in the RC file.

So, you can be assured that all Gets do have the ES_AUTOHSCROLL style, whether you added the style in your RC file or not.

So no need to change your programs or rc files.

Your problem is not whether or not the Get has ES_AUTOHSCROLL.


Hi, If I copy this caracters 01220036000106 and paste in another get I get this caracters 01220036000.


The real problem is the width of the Get Variable. The width of the Get variable you have used must be 11.

Then the Get does not allow you to enter characters exceeding 11 or in case of Paste, it truncates the value to 11. That is what is happening in your case.

If you have an intention to paste larger values, create the Get with character variable of adequate width.

Don't worry about horizontal scrolling. That is automatically built into every Get.
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Copy / Paste Behaviour
Posted: Thu Apr 28, 2022 04:56 PM
Code (fw): Select all Collapse
#include "fivewin.ch"

function Main()

   local oDlg, oFont, oGet1, oGet2, oGet3
   local cVal1 := "ABCDEFGHIJK"
   local cVal2 := PADR( "EFGH", 15 )
   local cVal3 := PADR( "SCRL", 20 )

   SetGetColorFocus()

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-20
   DEFINE DIALOG oDlg SIZE 400,200 PIXEL TRUEPIXEL FONT oFont

   @  40, 40 GET oGet1 VAR cVal1 SIZE 200,30 PIXEL OF oDlg
   @  90, 40 GET oGet2 VAR cVal2 SIZE 200,30 PIXEL OF oDlg
   @ 140, 40 GET oGet3 VAR cVal3 SIZE 100,30 PIXEL OF oDlg


   @  40,270 SAY "VarLen-11" SIZE 100,30 PIXEL OF oDlg
   @  90,270 SAY "VarLen-15" SIZE 100,30 PIXEL OF oDlg
   @ 140,270 SAY "VarLen-20" SIZE 100,30 PIXEL OF oDlg


   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil


Regards



G. N. Rao.

Hyderabad, India
Posts: 253
Joined: Wed May 25, 2016 01:04 AM
Re: Copy / Paste Behaviour
Posted: Mon May 02, 2022 05:54 PM
nageswaragunupudi wrote:
Code (fw): Select all Collapse
#include "fivewin.ch"

function Main()

   local oDlg, oFont, oGet1, oGet2, oGet3
   local cVal1 := "ABCDEFGHIJK"
   local cVal2 := PADR( "EFGH", 15 )
   local cVal3 := PADR( "SCRL", 20 )

   SetGetColorFocus()

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-20
   DEFINE DIALOG oDlg SIZE 400,200 PIXEL TRUEPIXEL FONT oFont

   @  40, 40 GET oGet1 VAR cVal1 SIZE 200,30 PIXEL OF oDlg
   @  90, 40 GET oGet2 VAR cVal2 SIZE 200,30 PIXEL OF oDlg
   @ 140, 40 GET oGet3 VAR cVal3 SIZE 100,30 PIXEL OF oDlg


   @  40,270 SAY "VarLen-11" SIZE 100,30 PIXEL OF oDlg
   @  90,270 SAY "VarLen-15" SIZE 100,30 PIXEL OF oDlg
   @ 140,270 SAY "VarLen-20" SIZE 100,30 PIXEL OF oDlg


   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil




Hi Mr. Nages,

What version of fivewin did you use to compile your example? The behavior I mentioned happens in a certain version of fivewin, 1811. The get variable size is correct, it was declared with size 14.
Thank you!
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Copy / Paste Behaviour
Posted: Tue May 03, 2022 03:54 AM
What version of fivewin did you use to compile your example? The behavior I mentioned happens in a certain version of fivewin, 1811. The get variable size is correct, it was declared with size 14.
Thank you!

Please take a little time copying the sample to your fwh1811 samples folder and test it. I am sure you did not have time to test it with fwh1811.

Even with fwh1811 also the behavior should be and in fact is EXACTLY the same.
Tested just now.

This has nothing to do with FWH.

It is the Clipper/Harbour GET class that does not allow entry of characters exceeding the length of the variable. This behavior is consistent from the first version of Clipper till today with (x)Harbour and we should all be familiar with it for years.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion