Object Packing in Box Container

This method is used to arrange the UI components in a Box container which maintains a specific order. Parameters are: 1. box object 2. child name(UI components) 3. horizontal weight hint 4. vertical weight hint 5. horizontal alignment hint (0.0 to 1.0) 6. vertical alignment hint (0.0 to 1.0)
static void object_pack(Evas_Object *box, Evas_Object *child, double horizontal_size,double vertical_size,double horizontal_position,double vertical_position)
{

	//This is a hint on how a container object should resize a given child within its area
	evas_object_size_hint_weight_set(child,horizontal_size,vertical_size);
	//Sets the hints for an object's alignment
	evas_object_size_hint_align_set(child,horizontal_position,vertical_position);
	//Makes the given Evas Object Visible
	evas_object_show(child);

	//Put the child to the end of the box
	elm_box_pack_end(box,child);

}

Responses

0 Replies