dheeraj reddy <sunsetim...@...> writes:

> 
> HelloCan you please tell me if Year View is possible in 
wxCalendarCtrlThankYou.-- Theeta
Try this it might help

-- begin
require("wx")

    dateFormat = '%d %B %Y'
    frame = wx.wxFrame( wx.NULL, wx.wxID_ANY, "wxTest")
    panel = wx.wxPanel(frame, wx.wxID_ANY)
    cal = wx.wxCalendarCtrl(panel,wx.wxID_ANY, wx.wxDefaultDateTime, 
wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxCAL_SHOW_SURROUNDING_WEEKS)
    text = wx.wxTextCtrl(panel, wx.wxID_ANY, cal.Date:Format(dateFormat))
    border = text.Size.Height / 2
    text:Move(wx.wxPoint(border + cal.Size.Width/2 -text.Size.Width/2, border))
    cal:Move(wx.wxPoint(border, text.Size.Height + border*2))
    
    frame.ClientSize = wx.wxSize(cal.Size.Width + 2*border, cal.Position.Y + 
cal.Size.Height + border)
    frame:Show()

    cal:Connect(wx.wxEVT_CALENDAR_SEL_CHANGED,  
        function (event) 
            text.Value =cal.Date:Format(dateFormat)
        end)
-- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop,
-- otherwise the wxLua program will exit immediately.
-- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the
-- MainLoop is already running or will be started by the C++ program.
wx.wxGetApp():MainLoop()

--------------------end
I am not too sure what you mean by Year View 

Andre


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to