Hello fre_ber.
I wrote the following scripts.
However, I cannot yet display a progress bar and time.
Best regards,
K-UDA
//
Includes ------------------------------------------------------------------
include("oops/r3window.js");
include("oops/r3packer.js");
include("oops/r3button.js");
include("oops/r3text.js");
include("real/gadget/r3progd.js");
include("real/code/r3progm.js");
// Variable
declarations -----------------------------------------------------
myWindow = new Object;
myPacker = new Object;
myButton = new Object;
myInfo = new Object;
myProgressgadget = new Object;
// Function
definitions ------------------------------------------------------
function Progress_work()
{
for(i = 0; i < 20000; i++)
{
myInfo.SetText("work =" + i);
}
}
// Handler for button to execute scriput.
function ButtonExecute()
{
myInfo.SetText("Start");
// Call a user function
Progress_work();
myInfo.SetText("Completed");
}
// JavaScript
program --------------------------------------------------------
{
// --- create a new window, as usual ---
myWindow = new r3Window(
R3WGA_Parent, _r3gui,
R3WGA_Left, 200,
R3WGA_Top, 100,
R3WA_Title, "Test Progress 003",
R3WA_ReportCloseWindow, true,
R3WA_ReportNewSize, true,
R3WA_Flags, R3WASF_SIZE + R3WASF_DRAGBAR + R3WASF_MAXIMIZE +
R3WASF_MINIMIZE + R3WASF_CLOSE);//Add _[]x button.
myButton = new r3Button(
R3WGA_Parent, myWindow,
R3GA_Text, "Start",
R3GA_ToolTip, "start button",
R3RA_Hook, ButtonExecute);
myInfo = new r3Text(
R3WGA_Parent, myWindow,
R3GA_Text, "Info",
R3GA_ToolTip, "info gadget",
R3GTA_Text, "", // current value
R3GTA_Border, true);
myProgressgadget = new r3Progressgadget(
R3WGA_Parent, myWindow,
R3GA_Text, "Progress",
R3PGA_Horizontal, true,//layaut to horizontal.
R3PGA_NoCancelButton, false);//Display a cancel button.
// --- Design layout for the GUI ----
myPacker = new r3Packer(R3PA_Orientation, R3PAOF_VERTICAL);
myPacker.ADD(R3PAPF_FILLX, R3PAAF_ALIGN, myButton);
myPacker.ADD(R3PAPF_FILLX, R3PAAF_ALIGN, myInfo);
myPacker.ADD(R3PAPF_FILLX, R3PAAF_ALIGN, myProgressgadget);
myWindow.SetGmanager(myPacker);
//Display indicator in info window
myButton.myInfo = myInfo;
// --- compute native size, show ---
myWindow.FIT(R3WFP_BESTFIT);
myWindow.REALIZE();
}
_______________________________________________
User-list mailing list
[email protected]
http://realsoft.com/mailman/listinfo/user-list_realsoft.com