This article is an e-mail sent to the uniface newsgroup by Ulrich Feiden and included here because we think that it is a very good example about access to the Uniface fields.

How make the coding of the paint tableau visible in Uniface ?

Dear Karl,

Does anyone have any tips for reading this field, correlating the

information with the other table (UXFIELD) and updating properties such as

color?

I have attached a aposting from last year regarding the coding in the

paint.tableau.

I have also attached a C-program PAINTVIEW to make the coding of the paint

tableau visible in Uniface.

You must create a DLL and assign it in the User-dll section.

Then paint the table uform with the dummy field DISPLAYFIELD and put the

following coding in the OGF trigger.

$30 = "formpic.uform"

length formpic.uform

$40 = $result

perform paintview

displayfield.uform = $53

The form will show you the codes for each component and you can play a

little bit around to identify the different codes.

I hope this helps

Ulrich Feiden

P.S.

We have a color update depending from trigger and/or property coding on our

to do list.

Please let me know, if you are interested in this feature.

--

----------------------------------------------

EDV Beratung Feiden GmbH

The home of: CODE INSPECTOR (former panta rei)

http://www.feiden.com

----------------------------------------------

Message posted on October 9, 1998 by Rob Spahitz

Additional codes that I've identified (for version 6, and maybe v7):

#; page framing

#< suppress empty

#G label font name

#A label alignment

#V label vertical alignment

#R label repeat

(there may be more for version 7)

Also, #9 is broken down as follows:

decimal-val bit-position desc

1 0 object border (frame border, version 5)

2 1 occurrence border

4 2 ?

8 3 ?

16 4 ?

32 5 (video underline in version 5)

64 6 alternate colors (32-63) (video inverse, v5)

128 7 video bright (v5)

256 8 video blink (v5)

512 9 \

1024 10 )

2048 11 > color (0-31)

4096 12 )

8192 13 /

16384 14 alternate colors (32-63)

32768 15 ? color none?

Also, {. is an new-line marker, and {A is a sort of "escape" sequence

And #1 codes include:

E - entity marker

F - field

H - header

T - trailer

A - area frame

B - break

L - line

P - pushbutton (version 5; replaced with F and widget type)

C - checkbox (v5; now use F)

R - radiobutton (v5; now use F)

#; codes include:

F - frame / print frame on same page

O - occurrence / print occurrence on same page

(N - none) default

#> codes include:

(A - all/automatic) default

Y - yes

N - never/no

T - top

L - left

R - right

B - bottom

#< codes include:

Y - yes / suppress print if empty

(N - no) default

#A codes include:

C - center horizontal alignment

R - right

(L - left) default

#V codes include:

C - center vertical alignment

B - bottom

(T - top) default

#R codes include:

Y - yes repeat label

C - repeat if not empty

(N - no)

Now...does anyone really care about this?

>From: "Ulrich Feiden" <uf@feiden.com>

>...

>

>I identified the following codes:

>

>#1 type (E means entity)

>#2 name

>#3 length (extended by optional border)

>#4 depth (extended by optional border)

>#5 depth

>#8 length

>#9 properties

>#: properties

>#> scroll bar

>

>To know which entity is painted inside another you must also know on what

>position the displayed entity is.

>

>Ulrich Feiden

>--

>----------------------------------------------

>EDV Beratung Feiden GmbH

>The home of: CODE INSPECTOR (former panta rei)

>http://www.feiden.com

>----------------------------------------------

>

/*----------------------------------------------------------------------------*/

/* Modul: PAINTVIEW */

/* */

/* Parameter: In: $30,$40 */

/* Out: $53,$54 */

/* */

/* Funktion : Displays Paint tableau codes */

/* In: Get strings from fields with passed names in $30 */

/* Field's length is passed in $40 */

/* $30 contains the paint tableau coding to be proceeded with */

/* lenghth in $40 */

/* Out: $53 paint tableau code */

/* $54 error message */

/*----------------------------------------------------------------------------*/

/* created U.Feiden 22.06.98 */

/*----------------------------------------------------------------------------*/

#include <windows.h>

#include <umsw3gl.h>

#include <uiodef.h>

#include <process.h>

#include <string.h>

#include <malloc.h>

XEXPORT(long) PAINTVIEW(void)

{

int size1;

int i;

char *textbuf1;

char *textbuf2;

char field_name[99];

char allocerr[60];

strcpy(allocerr,"not enough memory\0");

size1 = UGETREG(40);

if (size1 == 0) return(0);

if ((textbuf1=malloc(size1*sizeof(int)))==NULL)

{

printf("not enough memory\n");

UPUTREGS(54,allocerr);

return(0);

}

if ((textbuf2=malloc(size1*sizeof(int)))==NULL)

{

printf("not enough memory\n");

UPUTREGS(54,allocerr);

return(0);

}

UGETREGS(30,field_name,99);

UFGET(field_name,textbuf1,size1);

size1 = strlen(textbuf1);

for(i=0;i<size1;i++)

{

if(textbuf1[i] == 26)

{

textbuf2[i] = '°';

}

else

{

textbuf2[i] = textbuf1[i];

}

}

UPUTREGS(53,textbuf2);

fillnull(textbuf1,size1);

fillnull(textbuf2,size1);

free(textbuf1);

free(textbuf2);

}


Copyright © 1999-1999  $UUU  All rights reserved.
Disclaimer. | Site Comments.