Images
Publicado: Mié Mar 18, 2009 12:01 am
Hi Gents
I ran out of time to try and do the thermometer as a control ('I'll come
back to it) so I just created 8 bmp files that I use to make the guage move
Here's how I did it, I'd like some feed back as to if I have done it
correct. It works, but that doesn't mean it it done as it should be or could
be.
Thanks Nick
METHOD Setup( oSender ) CLASS TGaugeForm
::aGauges := {}
::nGaugePosition := 1
AADD(::aGauges, AppData:sAppPath + "20s.bmp")
AADD(::aGauges, AppData:sAppPath + "120s.bmp")
AADD(::aGauges, AppData:sAppPath + "220s.bmp")
AADD(::aGauges, AppData:sAppPath + "320s.bmp")
AADD(::aGauges, AppData:sAppPath + "420s.bmp")
AADD(::aGauges, AppData:sAppPath + "520s.bmp")
AADD(::aGauges, AppData:sAppPath + "620s.bmp")
AADD(::aGauges, AppData:sAppPath + "720s.bmp")
AADD(::aGauges, AppData:sAppPath + "720s+.bmp")
::oImage2:oPicture := TPicture():LoadFromFile(
::aGauges[::nGaugePosition])
RETURN Nil
METHOD Down( oSender ) CLASS TGaugeForm
If ::nGaugePosition > 1
::nGaugePosition := ::nGaugePosition -1
::oImage2:oPicture := TPicture():LoadFromFile(
::aGauges[::nGaugePosition])
EndIf
RETURN Nil
//---------------------------------------------------------- --------------------
METHOD Up( oSender ) CLASS TGaugeForm
If ::nGaugePosition < Len(::aGauges)
::nGaugePosition := ::nGaugePosition + 1
::oImage2:oPicture := TPicture():LoadFromFile(
::aGauges[::nGaugePosition])
EndIf
RETURN Nil
//---------------------------------------------------------- --------------------
I ran out of time to try and do the thermometer as a control ('I'll come
back to it) so I just created 8 bmp files that I use to make the guage move
Here's how I did it, I'd like some feed back as to if I have done it
correct. It works, but that doesn't mean it it done as it should be or could
be.
Thanks Nick
METHOD Setup( oSender ) CLASS TGaugeForm
::aGauges := {}
::nGaugePosition := 1
AADD(::aGauges, AppData:sAppPath + "20s.bmp")
AADD(::aGauges, AppData:sAppPath + "120s.bmp")
AADD(::aGauges, AppData:sAppPath + "220s.bmp")
AADD(::aGauges, AppData:sAppPath + "320s.bmp")
AADD(::aGauges, AppData:sAppPath + "420s.bmp")
AADD(::aGauges, AppData:sAppPath + "520s.bmp")
AADD(::aGauges, AppData:sAppPath + "620s.bmp")
AADD(::aGauges, AppData:sAppPath + "720s.bmp")
AADD(::aGauges, AppData:sAppPath + "720s+.bmp")
::oImage2:oPicture := TPicture():LoadFromFile(
::aGauges[::nGaugePosition])
RETURN Nil
METHOD Down( oSender ) CLASS TGaugeForm
If ::nGaugePosition > 1
::nGaugePosition := ::nGaugePosition -1
::oImage2:oPicture := TPicture():LoadFromFile(
::aGauges[::nGaugePosition])
EndIf
RETURN Nil
//---------------------------------------------------------- --------------------
METHOD Up( oSender ) CLASS TGaugeForm
If ::nGaugePosition < Len(::aGauges)
::nGaugePosition := ::nGaugePosition + 1
::oImage2:oPicture := TPicture():LoadFromFile(
::aGauges[::nGaugePosition])
EndIf
RETURN Nil
//---------------------------------------------------------- --------------------