]> git.saurik.com Git - wxWidgets.git/commitdiff
supporting alignment in single line controls, see #14452
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 4 Jul 2012 16:42:03 +0000 (16:42 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 4 Jul 2012 16:42:03 +0000 (16:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/textctrl.mm

index c75aad1a69ebb5791929b3faa29df6d6c845a365..0eb4afc84edd3e0a89d77050726df4cc9d3d2e84 100644 (file)
@@ -932,6 +932,15 @@ wxWidgetImplType* wxWidgetImpl::CreateTextControl( wxTextCtrl* wxpeer,
         else
             v = [[wxNSTextField alloc] initWithFrame:r];
 
+        if ( style & wxTE_RIGHT)
+        {
+            [v setAlignment:NSRightTextAlignment];
+        }
+        else if ( style & wxTE_CENTRE)
+        {
+            [v setAlignment:NSCenterTextAlignment];
+        }
+        
         if ( style & wxNO_BORDER )
         {
             // FIXME: How can we remove the native control's border?