Changed wxChoice->wxComboBox as list of all paper sizes is too large to fit

on screen. Works fine for wxGTK.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1999-08-03 15:20:23 +00:00
parent c9f9be4510
commit fa12f7e609
2 changed files with 14 additions and 9 deletions

View File

@@ -31,7 +31,7 @@
class WXDLLEXPORT wxTextCtrl; class WXDLLEXPORT wxTextCtrl;
class WXDLLEXPORT wxButton; class WXDLLEXPORT wxButton;
class WXDLLEXPORT wxCheckBox; class WXDLLEXPORT wxCheckBox;
class WXDLLEXPORT wxChoice; class WXDLLEXPORT wxComboBox;
class WXDLLEXPORT wxStaticText; class WXDLLEXPORT wxStaticText;
class WXDLLEXPORT wxRadioBox; class WXDLLEXPORT wxRadioBox;
class WXDLLEXPORT wxPrintSetupData; class WXDLLEXPORT wxPrintSetupData;
@@ -140,14 +140,14 @@ public:
virtual bool TransferDataFromWindow(); virtual bool TransferDataFromWindow();
virtual bool TransferDataToWindow(); virtual bool TransferDataToWindow();
wxChoice *CreatePaperTypeChoice(int* x, int* y); wxComboBox *CreatePaperTypeChoice(int* x, int* y);
public: public:
wxRadioBox* m_orientationRadioBox; wxRadioBox* m_orientationRadioBox;
wxTextCtrl* m_printerCommandText; wxTextCtrl* m_printerCommandText;
wxTextCtrl* m_printerOptionsText; wxTextCtrl* m_printerOptionsText;
wxCheckBox* m_colourCheckBox; wxCheckBox* m_colourCheckBox;
wxChoice* m_paperTypeChoice; wxComboBox* m_paperTypeChoice;
#if wxUSE_POSTSCRIPT #if wxUSE_POSTSCRIPT
wxPrintData m_printData; wxPrintData m_printData;
@@ -170,7 +170,7 @@ public:
void OnPrinter(wxCommandEvent& event); void OnPrinter(wxCommandEvent& event);
wxChoice *CreatePaperTypeChoice(int* x, int* y); wxComboBox *CreatePaperTypeChoice(int* x, int* y);
wxPageSetupData& GetPageSetupData() { return m_pageData; } wxPageSetupData& GetPageSetupData() { return m_pageData; }
public: public:
@@ -180,7 +180,7 @@ public:
wxTextCtrl* m_marginTopText; wxTextCtrl* m_marginTopText;
wxTextCtrl* m_marginRightText; wxTextCtrl* m_marginRightText;
wxTextCtrl* m_marginBottomText; wxTextCtrl* m_marginBottomText;
wxChoice* m_paperTypeChoice; wxComboBox* m_paperTypeChoice;
static bool m_pageSetupDialogCancelled; static bool m_pageSetupDialogCancelled;

View File

@@ -45,6 +45,7 @@
#include "wx/radiobox.h" #include "wx/radiobox.h"
#include "wx/filedlg.h" #include "wx/filedlg.h"
#include "wx/choice.h" #include "wx/choice.h"
#include "wx/combobox.h"
#include <wx/intl.h> #include <wx/intl.h>
#endif #endif
@@ -497,7 +498,7 @@ bool wxGenericPrintSetupDialog::TransferDataFromWindow()
return TRUE; return TRUE;
} }
wxChoice *wxGenericPrintSetupDialog::CreatePaperTypeChoice(int *x, int *y) wxComboBox *wxGenericPrintSetupDialog::CreatePaperTypeChoice(int *x, int *y)
{ {
/* Should not be necessary /* Should not be necessary
if (!wxThePrintPaperDatabase) if (!wxThePrintPaperDatabase)
@@ -520,7 +521,9 @@ wxChoice *wxGenericPrintSetupDialog::CreatePaperTypeChoice(int *x, int *y)
int width = 250; int width = 250;
wxChoice *choice = new wxChoice(this, wxPRINTID_PAPERSIZE, wxPoint(*x, *y), wxSize(width, -1), n, wxComboBox *choice = new wxComboBox(this, wxPRINTID_PAPERSIZE,
_("Paper Size"),
wxPoint(*x, *y), wxSize(width, -1), n,
choices); choices);
// SetFont(thisFont); // SetFont(thisFont);
@@ -741,7 +744,7 @@ bool wxGenericPageSetupDialog::TransferDataFromWindow()
return TRUE; return TRUE;
} }
wxChoice *wxGenericPageSetupDialog::CreatePaperTypeChoice(int *x, int *y) wxComboBox *wxGenericPageSetupDialog::CreatePaperTypeChoice(int *x, int *y)
{ {
/* /*
if (!wxThePrintPaperDatabase) if (!wxThePrintPaperDatabase)
@@ -763,7 +766,9 @@ wxChoice *wxGenericPageSetupDialog::CreatePaperTypeChoice(int *x, int *y)
(void) new wxStaticText(this, wxPRINTID_STATIC, _("Paper size"), wxPoint(*x, *y)); (void) new wxStaticText(this, wxPRINTID_STATIC, _("Paper size"), wxPoint(*x, *y));
*y += 25; *y += 25;
wxChoice *choice = new wxChoice(this, wxPRINTID_PAPERSIZE, wxPoint(*x, *y), wxSize(300, -1), n, wxComboBox *choice = new wxComboBox(this, wxPRINTID_PAPERSIZE,
_("Paper Size"),
wxPoint(*x, *y), wxSize(300, -1), n,
choices); choices);
*y += 35; *y += 35;
delete[] choices; delete[] choices;