Implement SetValue() and GetValue()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -12,6 +12,8 @@
|
|||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/textctrl.h"
|
#include "wx/textctrl.h"
|
||||||
|
|
||||||
|
#include "wx/cocoa/string.h"
|
||||||
|
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
#import <AppKit/NSTextField.h>
|
#import <AppKit/NSTextField.h>
|
||||||
|
|
||||||
@@ -110,8 +112,9 @@ void wxTextCtrl::Replace(long, long, wxString const&)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::SetValue(wxString const&)
|
void wxTextCtrl::SetValue(wxString const& value)
|
||||||
{
|
{
|
||||||
|
[GetNSTextField() setStringValue: wxNSStringWithWxString(value)];
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::WriteText(wxString const&)
|
void wxTextCtrl::WriteText(wxString const&)
|
||||||
@@ -179,6 +182,6 @@ bool wxTextCtrl::CanUndo() const
|
|||||||
|
|
||||||
wxString wxTextCtrl::GetValue() const
|
wxString wxTextCtrl::GetValue() const
|
||||||
{
|
{
|
||||||
return wxEmptyString;
|
return wxString([[GetNSTextField() stringValue] lossyCString]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user