Re: Style issues with VerticalPanel vs FlowPanel
Hi Dave, you could: a) allocate your anchors to the VP in a method that calls the required Vp setCellHeight(widget,height) method conveniently, e.g.: private void addAnchor(MyAnchor anchor) { myVP.add(anchor); myVP.setCellHeight(anchor,nnpx); } b) use a Grid with one column. Grid extends HTMLTable which has a ColumnFormatter with which you can apply your required height to all the cells using CSS. Note Grid needs to be sized up front, so it not always so convenient if you need to allocate items to it on the fly at run time (although you can add cells to it explicitly). regards gregor On Dec 6, 6:26 am, David H. Cook [EMAIL PROTECTED] wrote: After more doc reading, it now seems that the right approach is to use a VerticalPanel (i.e. so that ONE item per line is achieved), but then to alter the panel's border-width and cell-height. But, NOW what I can't quite understand, is how to code the 'setCellHeight' method. (What widget do they want for first arg?) If they just had a code-sample in their foolish doc for this method, I'd be home free. Anyone got a code snippet for this? TIA... Dave On Dec 6, 1:01 am, David H. Cook [EMAIL PROTECTED] wrote: Been playing with both a VerticalPanel and a FLowPanel, but I can't find a way to constrain a FlowPanel to just one entry per line. I've got a bunch (about 25) of anchor-elements (a tags). When I add then to a VerticalPanel, I achieve the one item per line, but there is way TOO MUCH wasted white-space, with the default cell-size and borders, etc. When I add each anchor to a FlowPanel, it solves the white-space issue, but then I get multiple anchors per line, all flowed together (which is no doubt why they call it that.) So, has anyone come upon a UI-object/technique to get achieve what I want? (Conceptually, a table of one column, with all the cellpadding and bordersizing set to minimal values sounds right, but without a code sample, that seems time-consuming to achieve.) Ideas? TIA... Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Style issues with VerticalPanel vs FlowPanel
Damn, I spoke too soon. The code compiles cleanly, but doesn't have any visual effect at all. [The cellsize parameter is a string, so I'm using stuff like 10px or 50px, right?] Tried making cellsize BIGGER...no effect. Smaller, no effect. [Something else must be in charge...the fontsize of the text of my widget (an anchor)?!?!] I'm still missing somthing! On Dec 6, 10:06 am, David H. Cook [EMAIL PROTECTED] wrote: Gregor - Thanks for the confirmation! (I finally deduced as much, after posting, that while one can set border size once before or after creating the VP, but that one must set the CellHeight for EACH cell since each cell could even contain a different widget type...hence the widget-arg.) And, I also just ran across the 'grid' UI-object after posting, and kinda figured that it might fit for me. What has been eluding me when reading the API docs is that, when I don't see the expected method I want, that I need to look further down into sections on methods inherited from more general object types. (Been just a bit too long ago that I did any serious Java-coding...sigh) My brain is slowly starting to understand these APIs...and they are SWEET once mastered! Thanks again for replying. Cheers... Dave On Dec 6, 8:07 am, gregor [EMAIL PROTECTED] wrote: Hi Dave, you could: a) allocate your anchors to the VP in a method that calls the required Vp setCellHeight(widget,height) method conveniently, e.g.: private void addAnchor(MyAnchor anchor) { myVP.add(anchor); myVP.setCellHeight(anchor,nnpx); } b) use a Grid with one column. Grid extends HTMLTable which has a ColumnFormatter with which you can apply your required height to all the cells using CSS. Note Grid needs to be sized up front, so it not always so convenient if you need to allocate items to it on the fly at run time (although you can add cells to it explicitly). regards gregor On Dec 6, 6:26 am, David H. Cook [EMAIL PROTECTED] wrote: After more doc reading, it now seems that the right approach is to use a VerticalPanel (i.e. so that ONE item per line is achieved), but then to alter the panel's border-width and cell-height. But, NOW what I can't quite understand, is how to code the 'setCellHeight' method. (What widget do they want for first arg?) If they just had a code-sample in their foolish doc for this method, I'd be home free. Anyone got a code snippet for this? TIA... Dave On Dec 6, 1:01 am, David H. Cook [EMAIL PROTECTED] wrote: Been playing with both a VerticalPanel and a FLowPanel, but I can't find a way to constrain a FlowPanel to just one entry per line. I've got a bunch (about 25) of anchor-elements (a tags). When I add then to a VerticalPanel, I achieve the one item per line, but there is way TOO MUCH wasted white-space, with the default cell-size and borders, etc. When I add each anchor to a FlowPanel, it solves the white-space issue, but then I get multiple anchors per line, all flowed together (which is no doubt why they call it that.) So, has anyone come upon a UI-object/technique to get achieve what I want? (Conceptually, a table of one column, with all the cellpadding and bordersizing set to minimal values sounds right, but without a code sample, that seems time-consuming to achieve.) Ideas? TIA... Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Style issues with VerticalPanel vs FlowPanel
Ok, finally solved it. I had my own project-specific .CSS file with default values for about every html element that exists! Removing it didn't help...some other default values (that Google supplies?) were still in effect. But, the fix was to go into my proj-specific .CSS and make all table- elements have 'padding' of '0px' (previously, I had '1em') This is no doubt needed for a 'VerticalPanel', because a VP gets implemented via some hidden 'table', so the table-element styles effect it. So, I'm now able to move on to more important stuff. (Whew!) On Dec 6, 12:04 pm, David H. Cook [EMAIL PROTECTED] wrote: Damn, I spoke too soon. The code compiles cleanly, but doesn't have any visual effect at all. [The cellsize parameter is a string, so I'm using stuff like 10px or 50px, right?] Tried making cellsize BIGGER...no effect. Smaller, no effect. [Something else must be in charge...the fontsize of the text of my widget (an anchor)?!?!] I'm still missing somthing! On Dec 6, 10:06 am, David H. Cook [EMAIL PROTECTED] wrote: Gregor - Thanks for the confirmation! (I finally deduced as much, after posting, that while one can set border size once before or after creating the VP, but that one must set the CellHeight for EACH cell since each cell could even contain a different widget type...hence the widget-arg.) And, I also just ran across the 'grid' UI-object after posting, and kinda figured that it might fit for me. What has been eluding me when reading the API docs is that, when I don't see the expected method I want, that I need to look further down into sections on methods inherited from more general object types. (Been just a bit too long ago that I did any serious Java-coding...sigh) My brain is slowly starting to understand these APIs...and they are SWEET once mastered! Thanks again for replying. Cheers... Dave On Dec 6, 8:07 am, gregor [EMAIL PROTECTED] wrote: Hi Dave, you could: a) allocate your anchors to the VP in a method that calls the required Vp setCellHeight(widget,height) method conveniently, e.g.: private void addAnchor(MyAnchor anchor) { myVP.add(anchor); myVP.setCellHeight(anchor,nnpx); } b) use a Grid with one column. Grid extends HTMLTable which has a ColumnFormatter with which you can apply your required height to all the cells using CSS. Note Grid needs to be sized up front, so it not always so convenient if you need to allocate items to it on the fly at run time (although you can add cells to it explicitly). regards gregor On Dec 6, 6:26 am, David H. Cook [EMAIL PROTECTED] wrote: After more doc reading, it now seems that the right approach is to use a VerticalPanel (i.e. so that ONE item per line is achieved), but then to alter the panel's border-width and cell-height. But, NOW what I can't quite understand, is how to code the 'setCellHeight' method. (What widget do they want for first arg?) If they just had a code-sample in their foolish doc for this method, I'd be home free. Anyone got a code snippet for this? TIA... Dave On Dec 6, 1:01 am, David H. Cook [EMAIL PROTECTED] wrote: Been playing with both a VerticalPanel and a FLowPanel, but I can't find a way to constrain a FlowPanel to just one entry per line. I've got a bunch (about 25) of anchor-elements (a tags). When I add then to a VerticalPanel, I achieve the one item per line, but there is way TOO MUCH wasted white-space, with the default cell-size and borders, etc. When I add each anchor to a FlowPanel, it solves the white-space issue, but then I get multiple anchors per line, all flowed together (which is no doubt why they call it that.) So, has anyone come upon a UI-object/technique to get achieve what I want? (Conceptually, a table of one column, with all the cellpadding and bordersizing set to minimal values sounds right, but without a code sample, that seems time-consuming to achieve.) Ideas? TIA... Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Style issues with VerticalPanel vs FlowPanel
Been playing with both a VerticalPanel and a FLowPanel, but I can't find a way to constrain a FlowPanel to just one entry per line. I've got a bunch (about 25) of anchor-elements (a tags). When I add then to a VerticalPanel, I achieve the one item per line, but there is way TOO MUCH wasted white-space, with the default cell-size and borders, etc. When I add each anchor to a FlowPanel, it solves the white-space issue, but then I get multiple anchors per line, all flowed together (which is no doubt why they call it that.) So, has anyone come upon a UI-object/technique to get achieve what I want? (Conceptually, a table of one column, with all the cellpadding and bordersizing set to minimal values sounds right, but without a code sample, that seems time-consuming to achieve.) Ideas? TIA... Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Style issues with VerticalPanel vs FlowPanel
After more doc reading, it now seems that the right approach is to use a VerticalPanel (i.e. so that ONE item per line is achieved), but then to alter the panel's border-width and cell-height. But, NOW what I can't quite understand, is how to code the 'setCellHeight' method. (What widget do they want for first arg?) If they just had a code-sample in their foolish doc for this method, I'd be home free. Anyone got a code snippet for this? TIA... Dave On Dec 6, 1:01 am, David H. Cook [EMAIL PROTECTED] wrote: Been playing with both a VerticalPanel and a FLowPanel, but I can't find a way to constrain a FlowPanel to just one entry per line. I've got a bunch (about 25) of anchor-elements (a tags). When I add then to a VerticalPanel, I achieve the one item per line, but there is way TOO MUCH wasted white-space, with the default cell-size and borders, etc. When I add each anchor to a FlowPanel, it solves the white-space issue, but then I get multiple anchors per line, all flowed together (which is no doubt why they call it that.) So, has anyone come upon a UI-object/technique to get achieve what I want? (Conceptually, a table of one column, with all the cellpadding and bordersizing set to minimal values sounds right, but without a code sample, that seems time-consuming to achieve.) Ideas? TIA... Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---