You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks wrong because the vadjustment parameter is never used, but hadjustment is used twice. I've tried to create a simple example to see what happens and something is wrong even if not exactly what I was expecting.
letmain()=let _local =GMain.init ()inlet window =GWindow.window ~title:"Layout Demo"~width:450~height:450()in
ignore@@ window#misc#connect#destroy ~callback:GMain.quit;
let sw =GBin.scrolled_window ~packing: window#add ()inlet layout =GPack.layout
~hadjustment: sw#hadjustment ~vadjustment: sw#vadjustment
~layout_width:600~layout_height:600~packing: sw#add ()inlet a =GMisc.label ~text:"A"()in
layout#put a#coerce ~x:20~y:20;
let b =GMisc.label ~text:"B"()in
layout#put b#coerce ~x:500~y:500;
window#show ();
GMain.main ()let _ = main ()
What happens when I compile and run this code is that the vertical scrolling works and horizontal scrolling doesn't.
However if I scroll horizontally and then vertically then it jumps to to the correct position.
Hope this helps
The text was updated successfully, but these errors were encountered:
Here is the
layout
definition from gPack.mlIt looks wrong because the
vadjustment
parameter is never used, buthadjustment
is used twice. I've tried to create a simple example to see what happens and something is wrong even if not exactly what I was expecting.What happens when I compile and run this code is that the vertical scrolling works and horizontal scrolling doesn't.
However if I scroll horizontally and then vertically then it jumps to to the correct position.
Hope this helps
The text was updated successfully, but these errors were encountered: