Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Tõnis Pihlakas
  Where is Tõnis Pihlakas?
 Tallinn
 Estonia
 Tõnis Pihlakas
 Tags
Subject: TimeTextBox + Grid
Thread ID: 33936 Message ID: 33936 # Views: 2 # Ratings: 0
Version: Visual FoxPro 8 Category: Grids
Date: Friday, December 05, 2003 8:59:28 AM         
   


Hi all

I have a "small" problem with a class I created - TimeTextBox. Basically it's a class for inserting time values, like 10:25, 23:14 and so on (24-hour clock) but the value (when accessed or assigned) should be in decimal format (10:30 = 10.5, 12:03 = 12.05 etc). There's also some format-checking going on in the Valid() event. It all works just fine separately, when the value is set (thisform.Timetextbox1.Value=10.5) or get (messagebox(thisform.Timetextbox1.Value) returns 10.5, still the user sees 10:30). The value itself (as I figured) must be stored in character format (10:30 = "1030").
But when I add the control to a grid (or onto a form) and bind its controlsource (thisform.Timetextbox1.ControlSource="c_temp.mytime") with a floating-type field, it seems that the controlsource accesses the value of the textbox directly, so that the cursor gets a field value of 1030.00 (should be 10.5). Does the grid/FoxPro itself somehow pass the _access / _assign methods or am I just missing something here?

Thanks in advance
T6nis

A Quick Brown Fox Jumps Over The Lazy Dog

ENTIRE THREAD

TimeTextBox + Grid Posted by Tõnis Pihlakas @ 12/5/2003 8:59:28 AM
RE: TimeTextBox + Grid Posted by Lucy Alice Pilanga @ 12/5/2003 9:35:59 AM
RE: TimeTextBox + Grid Posted by Tõnis Pihlakas @ 12/5/2003 9:59:31 AM
RE: TimeTextBox + Grid Posted by Lucy Alice Pilanga @ 12/5/2003 10:16:49 AM
RE: TimeTextBox + Grid Posted by Tõnis Pihlakas @ 12/5/2003 10:31:37 AM
RE: TimeTextBox + Grid Posted by Ken Blum @ 12/5/2003 4:40:56 PM
RE: TimeTextBox + Grid Posted by Tõnis Pihlakas @ 12/8/2003 4:38:10 PM
RE: TimeTextBox + Grid Posted by Tõnis Pihlakas @ 12/8/2003 6:20:29 PM
RE: TimeTextBox + Grid Posted by Ken Blum @ 12/8/2003 8:36:04 PM
RE: TimeTextBox + Grid Posted by Tõnis Pihlakas @ 12/9/2003 1:41:52 PM
RE: TimeTextBox + Grid Posted by Ken Blum @ 12/9/2003 4:27:04 PM
RE: TimeTextBox + Grid Posted by Tõnis Pihlakas @ 12/10/2003 8:17:23 AM
RE: TimeTextBox + Grid Posted by Tõnis Pihlakas @ 12/11/2003 9:26:04 AM
RE: TimeTextBox + Grid Posted by Ken Blum @ 12/11/2003 5:51:30 PM