Hi there. I am emulating a 640x480 window onto a 1280x960 canvas, all working
fine and
perfectly happy to leave this as-is, however I just thought I should say
something.
function resize_cb(Ihandle /*ih*/)
for twice=1 to 2 do
--
-- twice in case X/YHIDDEN change aka re-apply updated drawsize
--
integer {w, h} = IupGetIntInt(canvas, "DRAWSIZE")
IupSetInt(canvas,"DX",w)
IupSetInt(canvas,"DY",h)
end for
return IUP_DEFAULT
end function
Prior to the twice loop (which I am still going to need no matter what) I
noticed that
when I had dragged the scrollbar(s) off the 0-position, then maximised and
restored the
window, XHIDDEN was working but YHIDDEN was not (as in the scrollbars actually
being
shown on-screen), which I assume is because XHIDDEN is updated by the set of
DY, but
the latter is not setting its own YHIDDEN properly. I managed to replicate the
problem
on XHIDDEN instead by (removing the twice loop and) swapping the two set lines.
Note
that everything works fine when the scrollbar thumbs are in the 0-position.
You can run an online version at http://phix.x10.mx/p2js/scroller.htm just so
you can see
roughly what my demo is trying to do, but note that is not actually using any
of your code
(whereas the desktop version of that same demo does), does not have any
scrollbar handling
at all yet (so no such glitch), plus it needs a manual max/restore when first
run. Also it
is probably easier to translate that JavaScript code to C than the Phix code it
came from,
and obviously you can ignore (or take a peek) at the other six files it
includes.
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users