262 views
in GUI Development by
Hi paul,

 

How to set the alignment through property for textview.

1 Answer

0 votes
by

Hello Monse,

following examples demonstrate it:

// Align the text in the center of the Text view
Text.Alignment = Views::TextAlignment[ AlignHorzCenter, AlignVertCenter ];

// Align the text in the top-left corner of the Text view
Text.Alignment = Views::TextAlignment[ AlignHorzLeft, AlignVertTop ];

The difficult aspect of this operation is the expression on the right of the assignment operator. This expression results in a set of type Views::TextAlignment. The identifiers enclosed between the [ .. ] square brackets determine the desired items to add to the set. For more details please see:

Data types: Set type.

Align the text within the Text view area.

I hope it helps you further.

Best regards

Paul Banach

 

by
Thanks noted

One more question

 

I am using 9 slice frame image and added round corner button image as I wanted to changed the colour of the button so I changed the format alpha8 and also I changed the opacity to 50

Problem is when I run the gui  it colour changes from low colour to dark colour .

Do I need to do more settings
by

Hello Monse,

well, it is difficult to deduce what is wrong. I have following hints:

1. The Bitmap Frame view has 5 properties to configure the color. There are four properties for the four corners ColorTL..ColorBR and one common property Color. Usually you specify either the common color im the Color property or you specify the colors individually for the corners. If both approaches are used simultaneously the results may be unpredictable (in EW < 11.00). The version 11.00 calculates with all values by multiplying them. So check these properties.

2. You changed the Format of the bitmap to Alpha8. But have you verified that the used image file is suitable to be converted in Alpha8 bitmap resource? During conversion of the original image file, Embedded Wizard evaluates the brightness of each pixel and converts it in the corresponding opacity value. Black pixel means full transparency. White pixel, in turn, are interpreted as pixel being fully opaque. Gray values lying in between result in a semi transparent pixel. Please check the image file and if necessary create new image file suitable for the above described Alpha8 conversion.

Does it help you further?

Best regards

Paul Banach

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...