Page 1 of 1

Picture Clause to force Lower Case

Posted: Fri Feb 26, 2021 8:36 pm
by Rick Lipkin
To All

Having trouble finding the correct PICTURE clause to force lower case .. this is for upper case PICTURE "@!" what about lower case ??

Thanks
Rick Lipkin

Re: Picture Clause to force Lower Case

Posted: Fri Feb 26, 2021 10:44 pm
by Marc Venken
I Think it is not possible with PICTURE. See post of Mr. Rao

Picture function

A picture function specifies formatting rules for the entire output string. It must begin with the @ sign followed by one or more letters listed in the table below:

Picture function characters Function Formatting rule

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

Picture mask

The picture mask must be separated by a single space from the picture function. When no picture function is used, the picture string is identical with the picture mask. The mask defines formatting rules for individual characters in the output string. Characters from the following table can be used. The position of a character of a picture mask specifies formatting for the character of the output string at the same position. An exception is the @R function which causes non-mask characters being inserted into the output string.

Picture mask characters Charactere Formatting rule

A,N,X,9,# Formats digits for any data type
L Formats logicals as "T" or "F"
Y Formats logicals as "Y" or "N"
! Converts alphabetic characters to uppercase
$ Adds a dollar sign in place of a leading space in a number
* Adds an asterisk in place of a leading space in a number
. Specifies a decimal point position
, Specifies a comma position
Regards

G. N. Rao.
Hyderabad, India

Re: Picture Clause to force Lower Case

Posted: Fri Feb 26, 2021 10:58 pm
by Rick Lipkin
Marc

Sorry if I am missing the correct picture clause ... I want the picture clause to convert all to lower case ..

Thanks
Rick Lipkin

Re: Picture Clause to force Lower Case

Posted: Sat Feb 27, 2021 2:31 am
by karinha

Re: Picture Clause to force Lower Case

Posted: Sat Feb 27, 2021 4:26 am
by Armando
Rick:

Doesn't it work for you to define it in resources?

Regards

Re: Picture Clause to force Lower Case

Posted: Sat Feb 27, 2021 7:44 am
by nageswaragunupudi
There is NO picture clause in (x)Harbour/Clipper to force LowerCase.

But you can use the style ES_LOWERCASE (value 0x10).

If you define the GET from resources, add the style ES_LOWERCASE in the rc file.

If you define GET from source code, add this line

Code: Select all

oGet:WinStyle( ES_LOWERCASE, .t. )
 
after defining the Get.

Please make sure you added the define

Code: Select all

#define ES_LOWERCASE        0x0010
 
earlier in the module.

Re: Picture Clause to force Lower Case

Posted: Sat Feb 27, 2021 2:55 pm
by Rick Lipkin
Rao

Thanks for your help ... this form was from resources and I did see you can define the field for Lower Case ... just never thought to look there ...

Thanks Again
Rick Lipkin