You could use BINDEVENT:

CLEAR ALL

_SCREEN.AddProperty("oDH")
_SCREEN.oDH = CREATEOBJECT("DateHandler")

CREATE CURSOR test (fchar C(10), fdate D)
INSERT INTO test VALUES ("first",DATE())
INSERT INTO test VALUES ("second",DATE()+1)
INSERT INTO test VALUES ("third",DATE()+2)
GO TOP

_SCREEN.AddObject("oGrid","Grid")
BINDEVENT(_SCREEN.oGrid.Column2.text1,"DblClick",_SCREEN.oDH,"PopCal")
_SCREEN.oGrid.Visible = .t.

RETURN

DEFINE CLASS DateHandler AS Relation
FUNCTION PopCal
  AEVENTS(aEv,0)
  LOCAL oX
  oX = CREATEOBJECT("CalForm")
  oX.DateVal = aEv[1].Value
  oX.Show(1)
  REPLACE fdate WITH oX.DateVal
  RETURN
ENDFUNC
ENDDEFINE

DEFINE CLASS CalForm AS Form
DateVal = {}
FUNCTION Init
  this.AddObject("txtDV","textbox")
  this.txtDV.ControlSource = "thisform.DateVal"
  this.txtDV.Top = 5
  this.txtDV.Left = 5
  this.txtDV.Visible = .t.
  this.AddObject("cmdHide","cmdHideButton")
  this.cmdHide.Top = this.Height - this.cmdHide.Height - 3
  this.cmdHide.Left = 5
  this.cmdHide.Visible = .t.
  RETURN
ENDFUNC
ENDDEFINE

DEFINE CLASS cmdHideButton AS CommandButton
FUNCTION Click
  thisform.Hide()
  RETURN
ENDFUNC
ENDDEFINE



Fred


On Wed, Aug 20, 2014 at 2:29 PM, Jeff Johnson <[email protected]> wrote:

> Anyone have a clean way of putting a date picker of some sort in a grid?
> IOW add a textbox or combobox to a grid that displays a date.  Double click
> or some action to pop up a calendar & return a date to the control.
>
> Any ideas?
>
> --
> Jeff
>
> Jeff Johnson
> [email protected]
> SanDC, Inc.
> (623) 582-0323
> SMS (602) 717-5476
> Fax 623-869-0675
>
> Visit our forum at www.san-dc.com/forum
> Register and join in the discussion
>
> www.san-dc.com
> www.cremationtracker.com
> www.agentrelationshipmanager.com
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CAJCBkso4s82CZhKb-ntgTrip1X8bu_kJM-DFNdCy9P=1krs...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to