#2395 FlowLayout and fwt

shturman Mon 9 Feb 2015

I'm trying to use Fantom to create dashboard-style web app with dynamic content. Is there a way to create a FlowLayout with fwt looks like this?:

http://docs.oracle.com/javase/tutorial/uiswing/layout/flow.html

brian Mon 9 Feb 2015

Are you using desktop SWT or browser? In SWT there isn't something just like that. In browser there is undocumented webfwt::FlowPane

SlimerDude Mon 9 Feb 2015

dashboard-style web app

I guess it is web based! Here's a link to the src:

https://bitbucket.org/fantom/fan-1.0/src/tip/src/webfwt/fan/FlowPane.fan

shturman Tue 10 Feb 2015

Yes, something like this! But in my application I plan to use drag and drop capabilities like: http://packery.metafizzy.co/draggable.html where each colored block is fantom widget (I have not found the drag and drop features in webfwt and decided to use this library). So I need fantom js generates a simple <div> without control "position: absolute". And then the position property is changed by packery js.

brian Tue 10 Feb 2015

So I need fantom js generates a simple <div> without control "position: absolute".

Maybe be tricky to make that work with fwt/webfwt because that was all designed to mimic how the SWT works. Actually we are doing bit of work on new toolkit that would just map widgets to a dom div - but that is all prototype right now

shturman Tue 10 Feb 2015

Well, I'll wait for it. Thank you for your work, Fantom is a awesome language!

Login or Signup to reply.