Ciao Alex, is there any chance to have wxDatePickerCtrl support in wxRuby? cheers, bio. _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
Fabio Petrucci wrote:> is there any chance to have wxDatePickerCtrl support in wxRuby?Yeah, I can have a look at it; please file a Feature Request to track it. I''ve tried adding the class before and ran into problems. But classes that were previously difficult can often be solved now as the wrappings generally have improved. alex
> Yeah, I can have a look at it; please file a Feature Request to track it.done! thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20081205/21a04917/attachment.html>
May I ask if the wxDatePickerCtrl is now supported in the latest wxRuby? If so how would you obtain a value from it? Many thanks :) -- Posted via http://www.ruby-forum.com/.
Hi, 2009/2/16 Rooby Nooby <lists at ruby-forum.com>:> May I ask if the wxDatePickerCtrl is now supported in the latest wxRuby?Yes it is supported.> If so how would you obtain a value from it? Many thanks :)This is documented at http://wxruby.rubyforge.org/doc/datepickerctrl.html Chauk-Mean.
> Yes it is supported.Thank you for that, great news.> This is documented at > http://wxruby.rubyforge.org/doc/datepickerctrl.htmlSorry I should have mentioned that I have already looked at this page and have tried some of the methods but without success, hence my asking about the widget being supported. Currently, id_datectrl_from.get_value produces the following: #<SWIG::TYPE_p_wxDateTime:0x7f0fdf7e70c0> Is this what you would expect, and if so, how would you obtain a date value from it? One thing mentioned on this page is "It is only available if USE_DATEPICKCTRL is set to $1$" - how would I go about checking or implementing this? -- Posted via http://www.ruby-forum.com/.
Rooby Nooby wrote:> Sorry I should have mentioned that I have already looked at this page > and have tried some of the methods but without success, hence my asking > about the widget being supported. Currently, id_datectrl_from.get_value > produces the following: > > #<SWIG::TYPE_p_wxDateTime:0x7f0fdf7e70c0> > > Is this what you would expect, and if so, how would you obtain a date > value from it? >No, it''s a bug. Thanks for the report. It should return a ruby Time object (as other classes eg CalendarCtrl do). Ufnortunately you won''t be able to do anything useful with the current return value. It should be easy to fix - the SWIG typemap for wxDateTime that''s applied to wxDateTime& needs to be applied to wxDateTime. For some reason wxWidgets has one class return an C++ object and the other a C++ reference.> One thing mentioned on this page is "It is only available if > USE_DATEPICKCTRL is set to $1$" - how would I go about checking or > implementing this?Ignore this.
> No, it''s a bug. Thanks for the report.Glad to be of help!> It should be easy to fix - the SWIG typemap for wxDateTime that''s > applied to wxDateTime& needs to be applied to wxDateTime. For some > reason wxWidgets has one class return an C++ object and the other a C++ > reference.Er, yes, that''s just what I thought! Anyway I hope it''s easy to fix and I look forward to being able to use the datepicker shortly. -- Posted via http://www.ruby-forum.com/.
Does anyone know if there is any way to show the date in a wxDatePickerCtrl in UK date format (dd/mm/yyyy) rather than the default mm/dd/yyyy? -- Posted via http://www.ruby-forum.com/.
Rooby Nooby wrote:> Does anyone know if there is any way to show the date in a > wxDatePickerCtrl in UK date format (dd/mm/yyyy) rather than the default > mm/dd/yyyy? >Try adding this somewhere early in your App.run / App#on_init code: Wx::App.run do Wx::Locale.locale = ''en_GB'' ... end a