Hi Antonio,
I have included code below. I used the samples\testprog.prg as a guide but needed to place the progress bar on a dialog, not the window. I was unable to do this using a dialog from a resource. So, I built the dialog dynamically.
I added a function to post the nMin, nMax and nPos of the bar so you see what happens.
Also, it looks like the default DLG_CHARPIX_H and DLG_CHARPIX_W need to be adjusted for FWPPC as they yield objects too large.
Thanks!
#include "FWCE.ch"
FUNCTION Main()
LOCAL oWnd
DEFINE WINDOW oWnd TITLE "Progress"
@ 2, 2 BUTTON "Progress" SIZE 80, 25 ACTION ProgDialog()
ACTIVATE WINDOW oWnd
RETURN NIL
function ProgDialog()
local oDlg, oPgr
DEFINE Dialog oDlg TITLE "Progress Bars" FROM 5,12 TO 180, 230 PIXEL
@ 1, 1 SAY oSay PROMPT "Testing" OF oDlg SIZE 150, 20
@ 2, 0.9 PROGRESS oPgr OF oDlg SIZE 100, 15
@ 3, 1 BUTTON "-" OF oDlg SIZE 20, 20 ;
ACTION ( oPgr:nPosition -= 10 , BarStat( oSay, oPgr ) )
@ 3, 4 BUTTON "+" OF oDlg SIZE 20, 20 ;
ACTION ( oPgr:nPosition += 10 , BarStat( oSay, oPgr ) )
ACTIVATE DIALOG oDlg ON INIT ( oPgr:nPosition := 50, BarStat( oSay, oPgr ) )
return nil
Procedure BarStat( oSay, oPgr )
oSay:setText( Str( oPgr:nMin ) + ", " + Str( oPgr:nMax ) + ", " + Str( oPgr:nPos ) )
Return