From f513aa78ee5e038b389732ccbccca1cab2220446 Mon Sep 17 00:00:00 2001 From: David Elliott Date: Mon, 17 Sep 2007 16:43:30 +0000 Subject: [PATCH] Instantiate NSSecureTextField instead of NSTextField when wxTE_PASSWORD is specified. Copyright 2007 Software 2000 Ltd. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/textctrl.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cocoa/textctrl.mm b/src/cocoa/textctrl.mm index 8945f90161..67da0acd68 100644 --- a/src/cocoa/textctrl.mm +++ b/src/cocoa/textctrl.mm @@ -24,6 +24,7 @@ #import #import +#import #import #include @@ -45,7 +46,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID winid, if(!CreateControl(parent,winid,pos,size,style,validator,name)) return false; m_cocoaNSView = NULL; - SetNSTextField([[NSTextField alloc] initWithFrame:MakeDefaultNSRect(size)]); + SetNSTextField([(style & wxTE_PASSWORD)?[NSSecureTextField alloc]:[NSTextField alloc] initWithFrame:MakeDefaultNSRect(size)]); [m_cocoaNSView release]; [GetNSTextField() setStringValue:wxNSStringWithWxString(value)]; -- 2.50.0