From: Jim R. <gr...@cy...> - 2001-09-13 07:01:51
|
It seems most people start with a drop down menu or similar for Widget development, which oddly enough I've done. You can see it running here: http://wallace.iim.uts.edu.au/staging/grumpy/dropdown.html A few questions, is the Widget creation framework that's mentioned in the tutorials the preferred way? There was a comment that it hadn't been finalised, so I kinda guessed a bit based on previous work that I had done (eg: when to use .prototype. for methods and when not?) What I'm looking for though, you'll notice that the panels are quite long. That's because rather then make each item a separate panel, I've just done one big list. What I'd like to do is work out how long the list will be, and to resize the panel as expected. In Java I've got a nice thing in the Window object called pack(), which will resize a Window based on the preferred size of the loaded panels, components, etc. I can't see how to do this here. One reason is that I want the content to be in an <ul></ul> wrapped in a table so I can have a coloured border (which I know I could also make with panels as well, as in the button widget tutorial example.) One easy answer is to make each list item a panel, and enlarge the containing panel when I add each one. Which would also allow me to have a highlight on each rollover. But the other thing I will need to do is work out the width and height so I can position it correctly (eg: look at the third menu item with Teaching and Learning, it's too wide.) I also want to size them correctly, or resize if they need to be wider. I could use the CSS properties to get font metrics, but I'd rather not. Any ideas? |