Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Free calendar control
Message
 
 
À
21/06/2005 10:52:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01025169
Message ID:
01025337
Vues:
31
This message has been marked as the solution to the initial question of the thread.
Claudio,

It's not that hard to construct a CalendarDay object out of a container a couple of labels and text/editboxes to meet your specific display requirements and then dynamically add them to a form in calendar layout.

For example:
_screen.AddObject( "oCalendar", "Calendar", date() )
_screen.oCalendar.Visible = .t.

define class Calendar as Container 

function Init( ldWhen )
local lnDOW, ldCurrent, lnY, lnX

ldCurrent = date( year( ldWhen ), month( ldWhen ), 1 )

lnY = 10

do while month( ldCurrent ) = month( ldWhen )
   lnDow = dow( ldCurrent )
   lnX = ( lnDow - 1 ) * 110
   lcName = "day" + transform( day( ldCurrent ) )
   this.AddObject( lcName, "CalendarDay", day( ldCurrent ) )
   with evaluate( "this." + lcName )
      .Left = lnX
      .Top = lnY
      .Visible = .t.
      this.Height = max( this.Height, lnY + .Height + 10 )
      this.Width = max( this.Width, lnX + .Width + 10 )
   endwith
   ldCurrent = ldCurrent + 1
   if ( dow( ldCurrent, 0 ) = 1 )
      lnY = lnY + 60
   endif
enddo

enddefine

define class CalendarDay as Container

function Init( lnDay )
with this
   .Width = 100
   .Height = 50

   .AddObject( "lblDay", "label" )
   with .lblDay
      .Top = 1
      .Left = 10
      .Autosize = .t.
      .Caption = transform( lnDay )
      .Visible = .t.
   endwith
   .AddObject( "txtNotes", "textbox" )
   with .txtNotes
      .Top = 20
      .Left = 10
      .Width = 80
      .Visible = .t.
   endwith
endwith
enddefine
>I'm looking for a free good one calendar control (ocx/vcx), that allow me:
>

    >
  • Write on every day boxes some notes on captions (ex: summary of values, etc)

  • >
  • Trigger procedures on each day click

  • >
  • Customize the weekdays titles for dif. languages
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform