언어 설정

Menu
Sites
Language
Putting Button over a label

Hi,

I need to put several buttons over a single label.

How to do it?

Also,is there any way we can create layers to work with?

Thanks,

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

8 댓글
wil smith
You can draw your buttons over the label, but it allow you to set z-order or buttons can't be child control of label.
Siddharth Singh
Can someone provide a sample code of how to do that?
Danny YS Whang
What kind of use cases do you have in mind? I think it would be better to use a Panel, and add buttons to that, since the Panel is a Container. If you need to draw background or something to a Panel, then you can create a MyPanel and implement OnDraw() to do your background drawing, as well.
Siddharth Singh
Thanks for your reply. Basically i want to know if there is any method by which we can work with layers for UI controls so that i can manage that which of my controls will be on top & which ones on bottom. Like we have z order for Visual Elements...is there something for UI controls as well? Or else any other way by which the UI controls can be attached to these visual elements and hence can be monitored accordingly.
Danny YS Whang
There are SetControlAlwaysAtBottom/Top APIs in the Container class. You could place the controls in a container like a Panel and manage them using these, I think.
Siddharth Singh
Hi Danny, Thanks for pointing out....this may not be exactly what i needed but still it provides a way of working with layers for UI controls. This should be of great help. Thanks again....
Siddharth Singh
Hi, I think it is all that i needed. The API can be used directly with the UI controls as well such as below : SetControlAlwaysAtBottom(*pLabel,true); //this will take the label to the bottom layer and the buttom by default is on the middle layer so it comes on top of the Label. Vice-versa we can also put button on top layer. (The UI maintains a total of three layers : Bottom,Middle & Top). Thanks a lot for pointing out the API.
Siddharth Singh
In case the UI controls are at the same layer they can still be arranged with respect to z axis by controlling the Addcontrol API as follows: AddControl(pLabel); AddControl(pButton); //Button will appear on top of labal since it is added to the form later.