Redirect wxComboBox::SetFocus to its text field Part I.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
// Created: ??/??/98
|
// Created: ??/??/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) AUTHOR
|
// Copyright: (c) AUTHOR
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
@@ -191,6 +191,11 @@ bool wxComboBox::Show(bool show)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxComboBox::SetFocus()
|
||||||
|
{
|
||||||
|
m_text->SetFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void wxComboBox::DelegateTextChanged( const wxString& value ) {
|
void wxComboBox::DelegateTextChanged( const wxString& value ) {
|
||||||
}
|
}
|
||||||
@@ -206,8 +211,8 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
const wxString& value,
|
const wxString& value,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
int n, const wxString choices[],
|
int n, const wxString choices[],
|
||||||
long style,
|
long style,
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
@@ -239,7 +244,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
DoSetSize(pos.x, pos.y, csize.x, csize.y);
|
DoSetSize(pos.x, pos.y, csize.x, csize.y);
|
||||||
for ( int i = 0 ; i < n ; i++ )
|
for ( int i = 0 ; i < n ; i++ )
|
||||||
{
|
{
|
||||||
m_choice->DoAppend( choices[ i ] );
|
m_choice->DoAppend( choices[ i ] );
|
||||||
}
|
}
|
||||||
|
|
||||||
// have to disable this window to avoid interfering it with message
|
// have to disable this window to avoid interfering it with message
|
||||||
@@ -423,7 +428,7 @@ bool wxComboBox::SetStringSelection(const wxString& sel)
|
|||||||
void wxComboBox::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
|
void wxComboBox::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
|
||||||
{
|
{
|
||||||
wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId );
|
wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId );
|
||||||
event.SetInt(GetSelection());
|
event.SetInt(GetSelection());
|
||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
event.SetString(GetStringSelection());
|
event.SetString(GetStringSelection());
|
||||||
ProcessCommand(event);
|
ProcessCommand(event);
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: ??/??/98
|
// Created: ??/??/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) AUTHOR
|
// Copyright: (c) AUTHOR
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
@@ -191,6 +191,11 @@ bool wxComboBox::Show(bool show)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxComboBox::SetFocus()
|
||||||
|
{
|
||||||
|
m_text->SetFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void wxComboBox::DelegateTextChanged( const wxString& value ) {
|
void wxComboBox::DelegateTextChanged( const wxString& value ) {
|
||||||
}
|
}
|
||||||
@@ -206,8 +211,8 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
const wxString& value,
|
const wxString& value,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
int n, const wxString choices[],
|
int n, const wxString choices[],
|
||||||
long style,
|
long style,
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
@@ -239,7 +244,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
DoSetSize(pos.x, pos.y, csize.x, csize.y);
|
DoSetSize(pos.x, pos.y, csize.x, csize.y);
|
||||||
for ( int i = 0 ; i < n ; i++ )
|
for ( int i = 0 ; i < n ; i++ )
|
||||||
{
|
{
|
||||||
m_choice->DoAppend( choices[ i ] );
|
m_choice->DoAppend( choices[ i ] );
|
||||||
}
|
}
|
||||||
|
|
||||||
// have to disable this window to avoid interfering it with message
|
// have to disable this window to avoid interfering it with message
|
||||||
@@ -423,7 +428,7 @@ bool wxComboBox::SetStringSelection(const wxString& sel)
|
|||||||
void wxComboBox::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
|
void wxComboBox::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
|
||||||
{
|
{
|
||||||
wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId );
|
wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId );
|
||||||
event.SetInt(GetSelection());
|
event.SetInt(GetSelection());
|
||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
event.SetString(GetStringSelection());
|
event.SetString(GetStringSelection());
|
||||||
ProcessCommand(event);
|
ProcessCommand(event);
|
||||||
|
Reference in New Issue
Block a user