wxDatePicker and wxDateTime for PalmOS. Remove conflict with internal maxDays in PalmOS. #if wxUSE_XXX for limited builds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-02-15 07:24:37 +00:00
parent a63b47551e
commit 6a27c749b3
8 changed files with 53 additions and 12 deletions

View File

@@ -59,9 +59,9 @@ bool wxDatePickerCtrl::Create(wxWindow *parent,
wxString label;
if ( dt.IsValid() )
label = _T("test2");
label = dt.FormatDate();
ig(!wxControl::PalmCreateControl(selectorTriggerCtl, label, pos, size))
if(!wxControl::PalmCreateControl(selectorTriggerCtl, label, pos, size))
return false;
return true;
@@ -73,9 +73,7 @@ bool wxDatePickerCtrl::Create(wxWindow *parent,
wxSize wxDatePickerCtrl::DoGetBestSize() const
{
const int y = GetCharHeight();
return wxSize(DEFAULT_ITEM_WIDTH, EDIT_HEIGHT_FROM_CHAR_HEIGHT(y));
return wxSize(16,16);
}
// ----------------------------------------------------------------------------
@@ -84,7 +82,10 @@ wxSize wxDatePickerCtrl::DoGetBestSize() const
void wxDatePickerCtrl::SetValue(const wxDateTime& dt)
{
SetLabel(_T("test1"));
if ( dt.IsValid() )
SetLabel(dt.FormatDate());
else
SetLabel(wxEmptyString);
}
wxDateTime wxDatePickerCtrl::GetValue() const
@@ -105,5 +106,19 @@ bool wxDatePickerCtrl::GetRange(wxDateTime *dt1, wxDateTime *dt2) const
return false;
}
// ----------------------------------------------------------------------------
// helpers
// ----------------------------------------------------------------------------
bool wxDatePickerCtrl::SendClickEvent()
{
wxDateTime dt(wxDateTime::Today());
int16_t month = dt.GetMonth();
int16_t day = dt.GetDay();
int16_t year = dt.GetYear();
if(SelectDay(selectDayByMonth,&month,&day,&year,_T("Pick date")));
}
#endif // wxUSE_DATEPICKCTRL