Hi,
How I can set get to show right to left? Like this:
01 Left RIGHT
02 (Default)
03
04 ___.___,__ ___.___,__
05 1__.___,__ ___.__1,__
06 12_.___,__ ___._12,__
07 123.___,__ ___.123,__
08 123.4__,__ __1.234,__
09 __1.234,__ __1.234,5_
10 __1.234,5_ __1.234,56
11 __1.234,56 __1.234,56
Thanks in advance!
Get right to leff
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: Get right to leff
Code: Select all | Expand
#include "fivewin.ch"
function Main()
local oDlg, oGet, oFont
local nVar, cVar, cPic, nCent
SetGetColorFocus()
nVar := 0
cPic := "999,999,999,999" // Can have any number of decimals
nCent := 10 ^ LEN( AFTERATNUM( ".", cPic ) )
cPic += " "
cVar := TRANSFORM( nVar, cPic )
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-16
DEFINE DIALOG oDlg SIZE 400,300 PIXEL TRUEPIXEL FONT oFont
@ 20,20 GET oGet VAR cVar SIZE 200,24 PIXEL OF oDlg RIGHT
WITH OBJECT oGet
:bGotFocus := { || oGet:SetPos( Len( oGet:oGet:buffer ) ) }
:bKeyChar := <|nKey,nFlags|
if nKey >= 0x30 .and. nKey <= 0x39
nVar := nVar * 10 + ( nKey - 0x30 ) / nCent
oGet:cText := Transform( nVar, cPic )
oGet:SetPos( Len( oGet:oGet:buffer ) )
endif
if nKey == VK_TAB .or. nKey == VK_RETURN
return nil
endif
return 0
>
:bKeyDown := <|nKey,nFlags|
if nKey == VK_DELETE .or. nKey == VK_BACK
nVar := Int( nVar * nCent / 10 ) / nCent
oGet:cText := Transform( nVar, cPic )
oGet:SetPos( Len( oGet:oGet:buffer ) )
return 0
endif
return nil
>
END
@ 60,20 BUTTON "OK" SIZE 100,30 PIXEL OF oDlg ACTION MsgInfo( nVar )
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Get right to leff
nageswaragunupudi wrote:Code: Select all | Expand
#include "fivewin.ch"
function Main()
local oDlg, oGet, oFont
local nVar, cVar, cPic, nCent
SetGetColorFocus()
nVar := 0
cPic := "999,999,999,999" // Can have any number of decimals
nCent := 10 ^ LEN( AFTERATNUM( ".", cPic ) )
cPic += " "
cVar := TRANSFORM( nVar, cPic )
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-16
DEFINE DIALOG oDlg SIZE 400,300 PIXEL TRUEPIXEL FONT oFont
@ 20,20 GET oGet VAR cVar SIZE 200,24 PIXEL OF oDlg RIGHT
WITH OBJECT oGet
:bGotFocus := { || oGet:SetPos( Len( oGet:oGet:buffer ) ) }
:bKeyChar := <|nKey,nFlags|
if nKey >= 0x30 .and. nKey <= 0x39
nVar := nVar * 10 + ( nKey - 0x30 ) / nCent
oGet:cText := Transform( nVar, cPic )
oGet:SetPos( Len( oGet:oGet:buffer ) )
endif
if nKey == VK_TAB .or. nKey == VK_RETURN
return nil
endif
return 0
>
:bKeyDown := <|nKey,nFlags|
if nKey == VK_DELETE .or. nKey == VK_BACK
nVar := Int( nVar * nCent / 10 ) / nCent
oGet:cText := Transform( nVar, cPic )
oGet:SetPos( Len( oGet:oGet:buffer ) )
return 0
endif
return nil
>
END
@ 60,20 BUTTON "OK" SIZE 100,30 PIXEL OF oDlg ACTION MsgInfo( nVar )
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
Thank you so much Mr. Nages, but this is the easiest way? So many gets to change.
- Rick Lipkin
- Posts: 2674
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Re: Get right to leff
Rao
What are the < > markers .. should they be { codeblock .... }
Also ... If I need to trap arrow down and oRs:EOF with latest version on Fwh I can do something like :
Something like the above ?
Thanks
Rick Lipkin
What are the < > markers .. should they be { codeblock .... }
Also ... If I need to trap arrow down and oRs:EOF with latest version on Fwh I can do something like :
Code: Select all | Expand
:bKeyChar := {|nKey,nFlags|, if(nKey = VK_DOWN, If(oLbxB:bPastEof, _AddNewRow( ... ), ) )}
Something like the above ?
Thanks
Rick Lipkin
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: Get right to leff
but this is the easiest way? So many gets to change.
The easiest way is to use FWH 18.04.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Get right to leff
nageswaragunupudi wrote:but this is the easiest way? So many gets to change.
The easiest way is to use FWH 18.04.
Hi Nages,
What kind of changes in fwh18.04 to make easy this implementation?
Thank you!
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: Get right to leff
@ <r>, <c> GET <normal clauses> RIGHTTOLEFT <anymoreclauses>
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Get right to leff
nageswaragunupudi wrote:@ <r>, <c> GET <normal clauses> RIGHTTOLEFT <anymoreclauses>
Great news! Thanks.