Problem with paste in Get
- José Luis Sánchez
- Posts: 484
- Joined: Thu Oct 13, 2005 9:23 am
- Location: Novelda - Alicante - España
- Contact:
Problem with paste in Get
Hello,
I've a persistent problem in my applications with the paste of the content of a GET field. When I paste a text in a get field, the text doesn't paste fully, it onnly paste part of the text. For example, in a bank account that in Spain is a char(24), when I paste a value - sometimes from another record of the same application -, FWH doesn't paste the 24 char, it only pastes 18. However, if first I select the field - I go the the beginning of the filed, pulse SHIFT+END selecting the spaces on the GET - and then pressing CTRL+V then the full length of the filed is pasted. If I show th length of the variable associated to the field with Len(cVar) it returns the correct value.
I always make my dialogs from resources, and get fields are EDITTEXT in the .rc file, for example
EDITTEXT 120, 458, 64, 40, 12
I don't know if it is somwthing I'm doing wrong because it's a very big problem and I never read something like this in the forum. ¿ Someone can help me ? Big thanks.
Regards,
José Luis
I've a persistent problem in my applications with the paste of the content of a GET field. When I paste a text in a get field, the text doesn't paste fully, it onnly paste part of the text. For example, in a bank account that in Spain is a char(24), when I paste a value - sometimes from another record of the same application -, FWH doesn't paste the 24 char, it only pastes 18. However, if first I select the field - I go the the beginning of the filed, pulse SHIFT+END selecting the spaces on the GET - and then pressing CTRL+V then the full length of the filed is pasted. If I show th length of the variable associated to the field with Len(cVar) it returns the correct value.
I always make my dialogs from resources, and get fields are EDITTEXT in the .rc file, for example
EDITTEXT 120, 458, 64, 40, 12
I don't know if it is somwthing I'm doing wrong because it's a very big problem and I never read something like this in the forum. ¿ Someone can help me ? Big thanks.
Regards,
José Luis
Re: Problem with paste in Get
I have this problem all the time
Re: Problem with paste in Get
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
- José Luis Sánchez
- Posts: 484
- Joined: Thu Oct 13, 2005 9:23 am
- Location: Novelda - Alicante - España
- Contact:
Re: Problem with paste in Get
Thanks, but my field is text without format, and it's not the same issue.
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Problem with paste in Get
I made this small test and it appears working correctly for me.
Before copy and paste:
First, I blocked the five characters "CD" + CHR(24) + "EF" from the first Get and pressed Ctrl-C to copy.
Next, I blocked the five characters "CDXEF" in the second Get and pressed Ctrl-V to paste.
I found the paste working correctly.
After copy and paste:
For me, the copy and paste appears to be working correctly.
Code: Select all
function TestPaste()
local oDlg, oFont
local c1, c2
c1 := "ABCD" + CHR(24) + "EFGH"
c2 := "ABCDXEFGH"
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-20
DEFINE DIALOG oDlg SIZE 300,150 PIXEL TRUEPIXEL FONT oFont
@ 20,20 GET c1 SIZE 200,30 PIXEL OF oDlg
@ 50,20 GET c2 SIZE 200,30 PIXEL OF oDlg
@ 99,20 BUTTON "Show" SIZE 100,40 PIXEL OF oDlg ;
ACTION MsgInfo( STRTOHEX( c1 ) + CRLF + STRTOHEX( c2 ) + CRLF + ;
If( c1 == c2, "SAME", "NOT SAME" ) )
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
First, I blocked the five characters "CD" + CHR(24) + "EF" from the first Get and pressed Ctrl-C to copy.
Next, I blocked the five characters "CDXEF" in the second Get and pressed Ctrl-V to paste.
I found the paste working correctly.
After copy and paste:
For me, the copy and paste appears to be working correctly.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Problem with paste in Get
sometimes it works and sometimes it doesn't
- José Luis Sánchez
- Posts: 484
- Joined: Thu Oct 13, 2005 9:23 am
- Location: Novelda - Alicante - España
- Contact:
Re: Problem with paste in Get
Mr. Rao:
Thanks for your kind answer. I've converted your sample using resources, and it works properly.
and the resource file is:
I realized that the resource editor is including the clause ES_AUTOHSCROLL that I was not using in the resources in my programs. Then I've included this clause in .rc of one of my programs and it works fine. I've to change all the EDITTEXT to include the clause, but the problem is solved.
Big thanks, you have helped me to solve one of my BIG issues from FWH.
Regards from Novelda,
José Luis
Thanks for your kind answer. I've converted your sample using resources, and it works properly.
Code: Select all
#include "FiveWin.ch"
function Main()
local oDlg, oFont, aGet[2], oBtn
local c1, c2
c1 := "ES9901234567890123456789"
c2 := space(24)
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-16
DEFINE DIALOG oDlg RESOURCE "TEST"
oDlg:SetFont(oFont)
REDEFINE GET aGet[1] VAR c1 ID 10 OF oDlg
REDEFINE GET aGet[1] VAR c2 ID 11 OF oDlg
REDEFINE BUTTON oBtn ID 12 OF oDlg ;
ACTION MsgInfo( STRTOHEX( c1 ) + CRLF + STRTOHEX( c2 ) + CRLF + ;
If( c1 == c2, "SAME", "NOT SAME" ) )
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
Code: Select all
// Generated by ResEdit 1.5.11
// Copyright (C) 2006-2012
// http://www.resedit.net
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include "resource.h"
//
// Dialog resources
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
TEST DIALOG 61, 39, 241, 98
STYLE DS_3DLOOK | DS_MODALFRAME | DS_SETFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
CAPTION "TESTPASTE"
FONT 8, "Tahoma"
{
EDITTEXT 10, 8, 19, 225, 16, ES_AUTOHSCROLL
EDITTEXT 11, 8, 39, 225, 16, ES_AUTOHSCROLL
DEFPUSHBUTTON "Show", 12, 164, 67, 69, 23
}
Big thanks, you have helped me to solve one of my BIG issues from FWH.
Regards from Novelda,
José Luis
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Problem with paste in Get
José Luis,
many thanks for your feedback
many thanks for your feedback