1 /*! \page background Background
3 @section background-color Background Color
5 It is possible to set a background color for a DALi control. If the application writer wishes to
6 set a control with a red background:
9 Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
10 control.SetBackgroundColor( Dali::Color::RED );
13 <table border=0 cellpadding=10><tr>
15 \image html BackgroundControlColor.png
19 This can be used for ALL existing controls like TextLabel as well:
21 Dali::Toolkit::TextLabel label = Dali::Toolkit::TextLabel::New( "Hello World" );
22 label.SetBackgroundColor( Dali::Color::RED );
25 <table border=0 cellpadding=10><tr>
27 \image html BackgroundTextLabel.png
31 @section background-image Background Image
33 If required, the user can also set a background image as a DALi control:
36 Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
37 Dali::Image image = Dali::Image::New( "image.png" );
38 control.SetBackgroundImage( image );
41 <table border=0 cellpadding=10><tr>
43 \image html BackgroundImage.png
47 The background image is blended with the background color. If a red background color is set on the
50 control.SetBackgroundColor( Dali::Color::RED );
52 then the above image will look like:
54 <table border=0 cellpadding=10><tr>
56 \image html BackgroundImageColor.png
60 @section background-renderer Background Renderer
62 The background can be set to use a specified renderer, e.g the border renderer
64 Property::Map renderer;
65 renderer.Insert("rendererType","border");
66 renderer.Insert("borderColor",COLOR::RED);
67 renderer.Insert("borderSize",20.f);
69 control.SetProperty( Control::Property::BACKGROUND, renderer);
72 then the above image will look like:
73 <table border=0 cellpadding=10><tr>
75 \image html BackgroundBorder.png