Thursday, May 17th 2012, 5:17pm UTC+2

You are not logged in.

  • Login
  • Register

OlimilO

Intermediate

Posts: 277

Location: Germany

Occupation: software engineer

1

Thursday, June 4th 2009, 5:31pm

New MonthCalendar Control for the Jabaco framework

Hi there,


by experimenting with Usercontrols in Jabaco I have created a small Control what you call in VB a MonthCalendar.
It simply shows a sort of a Calendar that has a line for every week and the week day names in columns, where the user can select a special date. It's underlying working class is the GregorianCalendar from the namespace java#util.

if you drag an object of it onto a form you could use it on a form like this:

Jabaco Source

1
2
3
4
5
6
7
Public Sub MonthCalendar1_Selected() 
   MonthCalendar1.Visible = False 
   Command1.Caption = MonthCalendar1.Calendar.getTime.toLocaleString 
End Sub 
Public Sub Command1_Click() 
   MonthCalendar1.Visible = True 
End Sub

this is the first version so it is already working but it is in beta status.

i also left some room for extensions some ideas:
* let the user/programmer select the first week day (sunday or monday)
* adding an additional column on the left that shows the number of the week
* adding functionality that let the user perform addition/subtraction of timespans to the selected date
* coloring sunday, public holiday or all other special dates, e.g. birthdays
* let the user/programmer define his own user colors


greetings

OlimilO
OlimilO has attached the following image:
  • MonthCalendar.png
OlimilO has attached the following file:
  • Calendar_09.zip (8.49 kB - 300 times downloaded - Last download: May 5th 2012, 11:00am)

JonnyC

Beginner

Posts: 2

Location: Germany

2

Wednesday, October 7th 2009, 3:57pm

Looks and works great, thanx.

How about a little 'today' button?

OlimilO

Intermediate

Posts: 277

Location: Germany

Occupation: software engineer

3

Thursday, October 8th 2009, 9:01am

good suggestion, how would you design and code it?

JonnyC

Beginner

Posts: 2

Location: Germany

4

Monday, October 26th 2009, 8:38pm

Quick and Clean <hopefully> :-)

Jabaco Source

1
2
3
4
5
Public Sub cmd_set_today_Click()
   MyCal = New GregorianCalendar     
   Call InitDate(MyCal.getTime)
   bInitEnd = True
End Sub


JonnyC has attached the following file:

Rate this thread
WoltLab Burning Board