Languages

Menu
Sites
Language
Screen orientation issue when CheckButton is setchecked

Hello,

I have one form designed in landscape mode (orientation="Landscape" in xml). The form contains two CheckButtons and two Buttons.
The problem is that when I set any CheckButton as checked by code it show the form in portrait and cut.
Please note that I also setting the orientation by code:
 
pForm->SetOrientation(Tizen::Ui::ORIENTATION_LANDSCAPE); This is the code of the form:

Form code:

OnIniatilizing()
{​
     ​CheckButton* pCheckButton1 = static_cast<CheckButton*>(GetControl(L"IDC_CHECKBUTTON1", true));

     pCheckButton1->SetActionId(ID_CHECK_BUTTON1_CHECKED, ID_CHECK_BUTTON1_UNCHECKED, ID_CHECK_BUTTON1_SELECTED);

     pCheckButton1->AddActionEventListener(*this);

     pCheckButton1->SetSelected(false);

​} 

Have you experience any issue like this?

Thanks!

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

Responses

2 Replies
muditha murthy
SetOrientation()is an asynchronous method, so the control's bound doesn't get affected immediately after it is being invoked. Callback method OnOrientationChanged() of Tizen::Ui::IOrientationEventListener interface ensure the orientation change event is being handled. So use GetBound() method only after OnOrientationChanged() gets invoked. This will give you the correct dimension. NOTE: OnOrientationChanged() method has to be implemented by you and orientation change event listener has to be registered(AddOrientationEventListener())
Ricardo Casarez
Thanks a lot for your help. The orientation issue is now fixed fallowing your advice. Best Regards