+void WidgetsFrame::OnToggleLayoutDirection(wxCommandEvent& event)
+{
+ wxLayoutDirection dir = event.IsChecked() ? wxLayout_RightToLeft
+ : wxLayout_LeftToRight;
+
+ const Widgets widgets = CurrentPage()->GetWidgets();
+ for ( Widgets::const_iterator it = widgets.begin();
+ it != widgets.end();
+ ++it )
+ {
+ (*it)->SetLayoutDirection(dir);
+ (*it)->Refresh();
+ }
+}
+