Aligning Elements

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Aligning Elements

Rob Rothwell
Hello

Does anyone have a chunk of code from a view that would show me how best to align my form form elements?

I know how to add elements, but my alignment abilities are currently limited to "addBreak," or something like "style: '{position=absolute; margin-left: 25px}'!

It seems like the WebFieldSet object could be useful to name and position labeled controls for, say data entry, but there are not examples of such in the WebDemoApp.

Boy, I am really going to owe you guys a nice demo screencast showing a novice the basics!

Rob


_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Aligning Elements

Janko Mivšek
Hi Rob,

I would simply use tables for that. Yes I know, there are that movement
from tables to DIVs, but personally I think this gone to far. And we
have an excellent table support in Aida, why not use it?

A simple example:

   e := WebElement new.
   e table class: #webGrid; width: 200.
   e cell align: #right; add: 'Name: '.
   e newCell addInputFieldAspect: #name for: self observee.
   e newRow.
   e cell align: #right; add: 'Surname: '.
   e newCell addInputFieldAspect: #surname for: self observee.
   ^e

Now you can setup some additional CSS for that table. In above example I
reused default webGrid CSS class for that. Just rename that to something
else and introduce additional css method. Ok, you can even do that
inline by simply send:

        e table style: 'css for that table'

Janko






Rob Rothwell wrote:

> Hello
>
> Does anyone have a chunk of code from a view that would show me how best
> to align my form form elements?
>
> I know how to add elements, but my alignment abilities are currently
> limited to "addBreak," or something like "style: '{position=absolute;
> margin-left: 25px}'!
>
> It seems like the WebFieldSet object could be useful to name and
> position labeled controls for, say data entry, but there are not
> examples of such in the WebDemoApp.
>
> Boy, I am really going to owe you guys a nice demo screencast showing a
> novice the basics!
>
> Rob
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Aida mailing list
> [hidden email]
> http://lists.aidaweb.si/mailman/listinfo/aida

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Aligning Elements

Rob Rothwell
On Mon, Mar 10, 2008 at 5:56 PM, Janko Mivšek <[hidden email]> wrote:
Hi Rob,

I would simply use tables for that. Yes I know, there are that movement
from tables to DIVs, but personally I think this gone to far. And we
have an excellent table support in Aida, why not use it?

A simple example:

  e := WebElement new.
  e table class: #webGrid; width: 200.
  e cell align: #right; add: 'Name: '.
  e newCell addInputFieldAspect: #name for: self observee.
  e newRow.
  e cell align: #right; add: 'Surname: '.
  e newCell addInputFieldAspect: #surname for: self observee.
  ^e

Now you can setup some additional CSS for that table. In above example I
reused default webGrid CSS class for that. Just rename that to something
else and introduce additional css method. Ok, you can even do that
inline by simply send:

       e table style: 'css for that table'

Janko

Thank you.

You know...you have created ALL the tools you would need to build a visual layout tool that would generate your layouts for you--and right IN the browser itself, for that matter!  Especially using something as simple as your strong table support to place all your controls programmatically.  (Do you even think that would be a good idea?).
 
I know I will have to deliver something before I will be believable, but I seriously owe you some useful contribution to the Aida community!  I would have had a very hard time figuring this out since, like you have pointed out, examples are hard to come by, and the book has not been written!

Thanks again.  I hope the frequency of my "How do I's?" starts to diminish.  I'm still not sure how you keep up with your "real" work answering all our questions!

Rob

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Aligning Elements

Janko Mivšek
Rob Rothwell wrote:

> You know...you have created ALL the tools you would need to build a
> visual layout tool that would generate your layouts for you--and right
> IN the browser itself, for that matter!  Especially using something as
> simple as your strong table support to place all your controls
> programmatically.  (Do you even think that would be a good idea?).

It would be nice to have such visual builder, but developing it is not
simple at all and there are just too many failures of such projects out
there. Therefore I rather work on simplifying programming of web apps
instead of investing into such a risky project.

> I know I will have to deliver something before I will be believable, but
> I seriously owe you some useful contribution to the Aida community!  I
> would have had a very hard time figuring this out since, like you have
> pointed out, examples are hard to come by, and the book has not been
> written!

I hope, once in the future we can even have a book :) In the meantime
please continue asking good questions because that way a material for a
book is being collected.

> Thanks again.  I hope the frequency of my "How do I's?" starts to
> diminish.  I'm still not sure how you keep up with your "real" work
> answering all our questions!

Well, I make my living out of Aida, so answering to the questions is
simple. Not to mention a good feeling having a community!

JAnko

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida