Hi!
You can, but it is a bit tricky and hard to maintain. Better put it in the class.
Alos, some notes to your code :))
with This.frmOESWAdmin.pgfOESWAdmin.pgeShifts... <--(I'm lazy)
all thous "cPathToObject"s?
.NewObject("oleShiftCalendar","oleCalendar","BaseControls")
.oleShiftCalendar.Height = 286
.oleShiftCalendar.Left = 472
.oleShiftCalendar.Top = 18
.oleShiftCalendar.Width = 301
.oleShiftCalendar.ShowDateSelectors = .T.
.oleShiftCalendar.Visible = .T.
endwith
>Hi,
>
>I have the following code in a custom method:
>
>Local cPathToObject
>
>cPathToObject = "This.frmOESWAdmin.pgfOESWAdmin.pgeShifts." <--(I'm lazy)
>
>&cPathToObject.NewObject("oleShiftCalendar","oleCalendar","BaseControls")
>&cPathToObject.oleShiftCalendar.Height = 286
>&cPathToObject.oleShiftCalendar.Left = 472
>&cPathToObject.oleShiftCalendar.Top = 18
>&cPathToObject.oleShiftCalendar.Width = 301
>&cPathToObject.oleShiftCalendar.ShowDateSelectors = .T.
>&cPathToObject.oleShiftCalendar.Visible = .T.
>
>
>My question is, can I also put code in the calendar's right click method here or do I have to include it in the class this is based on ?
>
>PS: Really looking forward to the WhilFest to get some "face to face" on things like this.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.