Page 1 of 1

Problem with a get

PostPosted: Tue Apr 11, 2023 10:12 am
by Silvio.Falconi
I have to insert a measure 5 digit 2 dec

sample 300.12 or 0.12

local nTop := 0

I take the value not from a dbf but fron an array

@ nRow, 20 GET aGet[6] VAR nTop OF oModulo SIZE 50, 20 PIXEL FONT oFont UPDATE

I wish no insert PICTURE "999.99" because on dialog I have 000.00
I with not show any 0 on get control I tried also with ###.##

Image

I saw the samples testgetn.prg testgetr.prg on folder samples of fwh i have another problem


I explain you I have

@ nRow, 20 GET aGet[6] VAR nTop OF oModulo SIZE 50, 20 PIXEL FONT oFont PICTURE "999,99" UPDATE RIGHT
@ nRow, 82 GET aGet[7] VAR nLeft OF oModulo SIZE 50, 20 PIXEL FONT oFont PICTURE "999,99" UPDATE RIGHT

if I digit 0,1 it write 0 on first get and 1 on second get

but I need to wriyte 0,1 on first get


How I can resolve ?

Re: Problem with a get

PostPosted: Tue Apr 11, 2023 3:10 pm
by nageswaragunupudi
Use picture "@E 999.99"

Re: Problem with a get

PostPosted: Tue Apr 11, 2023 4:40 pm
by Silvio.Falconi
nageswaragunupudi wrote:Use picture "@E 999.99"


it run as U can see here



But I wish show only a zero and nont "0.00"

Re: Problem with a get

PostPosted: Fri Apr 14, 2023 12:36 pm
by Silvio.Falconi
nageswaragunupudi wrote:Use picture "@E 999.99"



Found the good solution

PICTURE "@Z 999.99"

on guide

Code: Select all  Expand view

B Formats numbers left-justified
C Adds CR (credit) after positive numbers
D Formats dates in SET DATE format
E Formats dates and numbers in British format
L Pads numbers with zeros instead of blank spaces
R Nontemplate characters are inserted
X Adds DB (debit) after negative numbers
Z Formats zeros as blanks
( Encloses negative numbers in parentheses
! Converts alphabetic characters to uppercase