xsharp.eu • Hopefully last question for a while. - Page 3
Page 3 of 3

Hopefully last question for a while.

Posted: Fri Apr 19, 2019 4:16 pm
by Karl-Heinz
Hi Jeff,

i created a window named JobInfo and placed a subform named JobInfo_DETAIL on it. Then i placed on the Subform a Date- and a Timepicker. In the Painter i selected the Tabpage "Datawindow" and changed the Property "Export Controls" to true !

Then i added a PushButton named UpdateButton to the JobInfo form. When i click on that button i see the content of both DTPs without any problems.

Code: Select all


METHOD UpdateButton () CLASS JobInfo 
LOCAL oTB AS  TextBox
                                                                      
                                                                       
	oTB := TextBox{ SELF, "" ,oSFJobInfo_DETAIL:oDCDateTimePicker1:SelectedTIme  + crlf + ;
				DToC  ( oSFJobInfo_DETAIL:oDCDateTimePicker2:SelectedDate ) }    
				
	oTB:Type := BUTTONOKAY + BOXICONASTERISK
	oTB:Show()     

	RETURN SELF


regards
Karl-Heinz

Hopefully last question for a while.

Posted: Fri Apr 19, 2019 4:27 pm
by Karl-Heinz
FFF wrote:umm, can't see you answered any of the questions asked...
:lol:

At least the second thread page just opened :-)

Hopefully last question for a while.

Posted: Fri Apr 19, 2019 8:41 pm
by BiggyRat
Thanks so much Karl-Heinz. I wasn't looking in that area at all; I was concentrating solely on the actual controls themselves. Again... I've learned something. Thank you very much again.

Hopefully last question for a while.

Posted: Thu Jun 06, 2019 5:38 am
by BiggyRat
This question still seems unresolved:

I have a date/time picker set to time format. When I set the time eg 10:25:44 PM, on writing it back to the database, it drops back to AM.
The rest of it is stored correctly. My obvious question is WHY?
I've since set the format to hh:mm tt and it makes no difference at all. I've also tried SetAMPM to both True and False at different times, which also made no difference.

Here is some current code:

METHOD UpdateJobRepWin() CLASS JobNoRep
local nRecNo
local oJobInfo as JobInfo
SetAmPm(true) <=============== also tried FALSE
nRecNo := self:server:RecNo
oJobInfo := JobInfo{,,,nRecNo}
self:server:FIELDPUT(#JOBDATE, self:oDCDateTimePicker1:SelectedDate) <= works fine
self:server:FIELDPUT(#JOBTIME, self:oDCDateTimePicker2:SelectedTime) <== always goes to AM despite being set to PM. Also tried CurrentText and CurrentItem - no luck
self:server:FIELDPUT(#RATETYPE, self:oDCComboBox1:VALUE)

oJobInfo:oSFJobInfo_Detail:server:GoTo(nRecNo)
oJobInfo:oSFJobInfo_Detail:server:Commit()
oJobInfo:oSFJobInfo_Detail:server:Refresh()
oJobInfo:Show(SHOWCENTERED)
self:Destroy()
RETURN self

Hopefully last question for a while.

Posted: Thu Jun 06, 2019 6:13 am
by BiggyRat
Forget it guys. I worked it out... All I needed was:

SetInternational(#Clipper) in my App:Start()

Problem solved! Thanks anyway