gget79
21st August 2009, 23:26
Hi,
I am very interested by DsC components, but I don't find any example to try.
I looked for in the forums, but I don't see anything.
Anybody can tell me if exists in LN 6.1 some standard session built with these DsC components?
Or
Anybody can give me a tutorial or example of this?
Thank's
_Ralph_
24th August 2009, 21:45
Here is some example extracted from this program:
http://www.baanboard.com/baanboard/showthread.php?t=53872
In this case we use 2 objects DsCgwindow and DsClabel one above the other
Basically the secret is on the set up of the arguments.
function create.frame()
{
frame.id = create.object(DsCgwindow, current.mwindow(),
DsNx, 655, DsNy, 246, |*(x,y)
DsNwidth, 95, DsNheight, 40, |* Size
DsNbackground, RGB.YELLOW,
DsNinferiorPointerCursor, DSCHAND) |* Mouse Cursor
label.id = create.object(DsClabel, frame.id,
DsNstring, "Loading", |* Frame Text
DsNx, 30, DsNy, 13) |* (x,y) on screen
update.object(frame.id)
update.object(label.id)
}
function update.dsc.stat(domain tcbool error)
{
if error then
change.object(frame.id, DsNbackground, RGB.RED)
change.object(frame.id, DsNinferiorPointerCursor, DSCNODROP)
change.object(label.id, DsNstring, "Error")
else
change.object(frame.id, DsNbackground, RGB.GREEN)
change.object(frame.id, DsNinferiorPointerCursor, DSCCROSSHAIR)
change.object(label.id, DsNstring, "Done")
endif
update.object(frame.id)
update.object(label.id)
}
function reset.dsc.stat()
{
change.object(frame.id, DsNbackground, RGB.YELLOW)
change.object(frame.id, DsNinferiorPointerCursor, DSCHAND)
change.object(label.id, DsNstring, "Loading")
update.object(frame.id)
update.object(label.id)
}