[Module] CalendarEx - Gadget (all OS)

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

[Module] CalendarEx - Gadget (all OS)

Post by Thorsten1867 »

CalendarEx - Gadget (all OS / 64Bit / DPI)
  • Display of appointments
  • Import & Export of iCal
  • Date64 support
  • Automatic size adjustment
  • Support of GUI themes (requires ModuleEx.pbi)
Image

Code: Select all

; CalendarEx::AddEntry()           - add an entry to the calendar
; CalendarEx::AttachPopupMenu()    - attachs a popup menu to the chart
; CalendarEx::CountEntries()       - counts entries of the day of current month
; CalendarEx::GetDate()            - similar to Date()
; CalendarEx::DefaultCountry()     - set country code for default language [DE/AT/FR/ES/GB/US]
; CalendarEx::DisableReDraw()      - disable/enable redrawing
; CalendarEx::ExportDay()          - exports the events of this day as a file    (iCal)
; CalendarEx::ExportLabel()        - exports the event with this label as a file (iCal)
; CalendarEx::EventDate()          - returns date after event
; CalendarEx::EventDayOfMonth()    - returns the day of month
; CalendarEx::EventEntries()       - returns calendar entries after event as linked list (CalendarEx::Entries_Structure)
; CalendarEx::Gadget()             - create a new gadget
; CalendarEx::GetDay()             - returns day of selected date
; CalendarEx::GetEntries()         - all entries on this date as linked list (CalendarEx::Entries_Structure)
; CalendarEx::GetMonth()           - returns month of selected date
; CalendarEx::GetState()           - returns selected date
; CalendarEx::GetYear()            - returns year of selected date
; CalendarEx::ImportEvent()        - imports an event from a file (iCal)
; CalendarEx::MonthName()          - defines name of the month
; CalendarEx::RemoveEntry()        - removes an entry form the calendar
; CalendarEx::SetAttribute()       - similar to SetGadgetAttribute()
; CalendarEx::SetAutoResizeFlags() - [#MoveX|#MoveY|#Width|#Height]
; CalendarEx::SetDate()            - similar to SetGadgetState()
; CalendarEx::SetEntryColor()      - change color of entry
; CalendarEx::SetEntryMask()       - change mask of entry
; CalendarEx::SetColor()           - similar to SetGadgetColor()
; CalendarEx::SetFlags()           - set flags [#Year/#Month/#Gadget]
; CalendarEx::SetFont()            - similar to SetGadgetFont()
; CalendarEx::SetMask()            - define mask for time or date
; CalendarEx::SetState()           - similar to SetGadgetState()
; CalendarEx::ToolTipText()        - define mask for tooltips
; CalendarEx::WeekDayName()        - defines name of the weekday
; CalendarEx::UpdatePopupText()    - update menu item text with this mask
Download: CalendarExModule.pbi
Last edited by Thorsten1867 on Fri Dec 20, 2019 3:55 pm, edited 13 times in total.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
zikitrake
Addict
Addict
Posts: 834
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Re: [Module] Calendar - Module (all OS)

Post by zikitrake »

Image
Cyllceaux
Enthusiast
Enthusiast
Posts: 458
Joined: Mon Jun 23, 2014 1:18 pm
Contact:

Re: [Module] Calendar - Module (all OS)

Post by Cyllceaux »

This is cool... But:

Image

I think it's part of the dpi problem
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] Calendar - Module (all OS)

Post by Thorsten1867 »

Update:
  • Added: #GreyedDays to show days of previous/next month
  • Added: AddEntry() to adds calendar entries
  • Added: ToolTips for calendar entries
Image
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] Calendar - Module (all OS)

Post by Thorsten1867 »

Added: ToolTip-Module for multiline tooltips with title
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Lord
Addict
Addict
Posts: 847
Joined: Tue May 26, 2009 2:11 pm

Re: [Module] Calendar - Module (all OS)

Post by Lord »

Hi!

If year is set to "1970" and month to "January" and then
the left arrow is clicked, the gadegt turns to "0" and it
is not possible to get any real year and month back.
Click on left and right arrow doesn't work then.
If you click on the "0", the spingadget appears, still set
to "1970", but the up and down arrows don't have any
effect.
Image
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] Calendar - Module (all OS)

Post by Thorsten1867 »

Update: Added Date64-Module to support dates less than 1970 and greater than 2038.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: [Module] Calendar - Module (all OS)

Post by Andre »

Looks good, thanks for providing us! :D
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: [Module] Calendar - Module (all OS)

Post by BarryG »

Thorsten1867 wrote:Added Date64-Module to support dates less than 1970 and greater than 2038.
Nice! Will have to check this out.
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] Calendar - Module (all OS)

Post by Thorsten1867 »

Bugfixes: DPI for ToolTips

Update: LeftDoubleClick returns as EventData() the day of month (#EventType_Day)
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] Calendar - Module (all OS)

Post by Thorsten1867 »

Update:
  • Added: Popup menu for days of month / UpdatePopupText()
  • Added: #EventType_Focus / #EventType_RightClick
  • Added: EventDate() / EventEntries()
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] Calendar - Module (all OS)

Post by Thorsten1867 »

Update: Import & export of calendar entries in iCal-format
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] Calendar - Module (all OS)

Post by Thorsten1867 »

Update:
  • Changed: AddEntry() -> colors and tooltip mask removed
  • Added: SetEntryColor() / SetEntryMask() / CountEntries() / GetEntries()
  • Added: Calendar entry flags (#FullDay/#StartTime/#Duration)
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: [Module] Calendar - Module (all OS)

Post by Andre »

In latest version (13th July) I get an "Module element Gadget() not found" error at this line:

Code: Select all

 [2234]         Calendar()\TooltipNum = ToolTip::Gadget(Calendar()\CanvasNum, Calendar()\Window\Num)
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] Calendar - Module (all OS)

Post by Thorsten1867 »

Bugfixes
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
Post Reply