Languages

Menu
Sites
Language
Evas_object_color on Box

Hi All,

As I can do a color set using evas_object_color_set() API on Layout (elm_layout), isn't this supported by the object Box.

I am adding a box into layout content. I did set the colors for layout and box. All i see is the layout color, but no box color.

Is the Box by default TRANSPARENT, and not supporting the COLOR setting? or am i doing something terribly wrong?

Thanx,

Ashwini

Responses

5 Replies
Jean Yang

Hi, 

I have try this, same result as you, but if want to set color on the for an area in your app, there are some other ways, for example, set bg, use image...

Ashwini Kumar

Hi All,

Another query,

Can the elm_layout be resized using size_hint_weight_set(), as when I am adding a layout into my elm_box, I want to limit it,s size and alignment.

But what I observed is that the layout is aligned in centre. And weight_hint doesn't have any effect. It is coming onto full screen.

Thanx,

Ashwini

Vikram

size_hint_weight_set is used to let the parent object to calculate its children's size dynamicly base on the children's weight value. You can try to add two or more object to the parent with different weight, then you can observed them have different size in the parent. It's ineffective for only one child.

Try "evas_object_size_hint_min_set" and "evas_object_size_hint_max_set".

Ashwini Kumar

Thanks, it did work for me.

No another issue I have....

I am adding a Table (elm_table) to my layout. I am trying to pack members into table. If i am adding only the Label... it appears fine on screen

But when I try to add another layout or a box as part of the Table element, the cell area is BLACK.... Pitch Black. Showing nothing else.

Though I tried to set the color to my layout... but to no effect.

Is there anything I am missing... or the table items other than label are black only?

My aim is to have a Table with showing boundries around the Cell. Any other way to achieve this is welcome.

Thanx,

Ashwini

Jean Yang

Hi, 

My understanding of the table cell is decided by your content, you can create the Application Store demo in IDE, then you can find one table contains 6 image button, and can see the boundries of each cell. 

please find the function ---add_item_table(Evas_Object *parent, int content_height)