About Dock (SetDock)

11 views
Skip to first unread message

wahono sri

unread,
Mar 26, 2013, 9:31:09 PM3/26/13
to li...@googlegroups.com
I try dock property, but I can set 1 dock type only. Actually somtimes we need to set more than 1, ex: bottom and top/bottom and right/etc.

IMO, docking has 5 basic type (display in property):

  • top
  • bottom
  • left
  • right
  • fill
implementation
  • fill = stretch width and height to parent area
  • top, bottom, left, right  = stretch only which side is set to parent area
I hope my illustration attached can explain my proposal.

Thanks
Untitled.png

wahono sri

unread,
Mar 26, 2013, 9:53:52 PM3/26/13
to li...@googlegroups.com
Sorry, I got the answer, use SetDockMargin() is what I expect to my purpose.

Thanks

Jack Lee

unread,
Mar 26, 2013, 9:55:48 PM3/26/13
to li...@googlegroups.com
The first one:

append(
    (new linb.UI.Block)
    .setHost(host,"ctl_block2")
    .setDock("top")
    .setDockMargin({"left":100, "top":100, "right":100, "bottom":100})
);


The second one:

append(
    (new linb.UI.Block)
    .setHost(host,"ctl_block3")
    .setDock("left")
    .setDockMargin({"left":100, "top":100, "right":100, "bottom":100})
);


And, the third one:

append(
    (new linb.UI.Block)
    .setHost(host,"ctl_block4")
    .setLeft('auto')
    .setTop('auto')
    .setRight(100)
    .setBottom(100)
);

wahono sri

unread,
Mar 26, 2013, 10:10:48 PM3/26/13
to li...@googlegroups.com
Ok, thanks. JSLinb has powerfull setting to customize UI.
Reply all
Reply to author
Forward
0 new messages