Hello,
1) I've been experimenting a lot to get the title of a SectionStackSection aligned in center.
So setting align="center" here:
I tried
but no luck (and the SectionHeader is only available after component was drawn).
I tried setting no title and created a Label or a DynamicForm with an item to set the title as control, but alignment is not great either and I would still like to use the setTitle() functionality.
The best result was setting it via CSS in the HTML page/external CSS file:
but this overrides all SectionStackSections of course (I still want some others to left-align).
Looking at SectionStack.js I guess I could add the align:"center" property in the ImgSectionHeader.backgroundDefaults but I'm not sure if the whole SmartClient AutoChild concept is already available in SmartGWT?
Subclassing SectionStackSection doesn't make me any wiser, there are no "setProperty" methods on it.
2) Another topic is that I want to set the section.setCanCollapse(false)
and the stack.addSectionHeaderClickHandler still to do something when clicking on the section (with changing mouse pointers).
I guess a workaround would be to setCanCollapse(true), making the style not change whenever the section is open or closed, and removing the "collapse icon" myself, but I also can't seem to do that from within Java: setControls(dummy) still shows the collapse icon for example.
I was even trying to get it working with the ClickHandler on the stack and checking if the event's coordinates are inside each section, but that sounds harsh to do.
Any hints on these?
cheers
SmartGWT LGPL 2010-08-17
1) I've been experimenting a lot to get the title of a SectionStackSection aligned in center.
So setting align="center" here:
Code:
<td nowrap="true" class="imgSectionHeaderTitleopened" style="padding-top:0px;padding-bottom:0px;" align="left" valign="center">Section</td>
Code:
getSectionHeader().setAlign(Alignment.CENTER)
I tried setting no title and created a Label or a DynamicForm with an item to set the title as control, but alignment is not great either and I would still like to use the setTitle() functionality.
The best result was setting it via CSS in the HTML page/external CSS file:
Code:
.imgSectionHeaderTitleclosed, .imgSectionHeaderTitleopened { text-align: center; }
Looking at SectionStack.js I guess I could add the align:"center" property in the ImgSectionHeader.backgroundDefaults but I'm not sure if the whole SmartClient AutoChild concept is already available in SmartGWT?
Subclassing SectionStackSection doesn't make me any wiser, there are no "setProperty" methods on it.
2) Another topic is that I want to set the section.setCanCollapse(false)
and the stack.addSectionHeaderClickHandler still to do something when clicking on the section (with changing mouse pointers).
I guess a workaround would be to setCanCollapse(true), making the style not change whenever the section is open or closed, and removing the "collapse icon" myself, but I also can't seem to do that from within Java: setControls(dummy) still shows the collapse icon for example.
I was even trying to get it working with the ClickHandler on the stack and checking if the event's coordinates are inside each section, but that sounds harsh to do.
Any hints on these?
cheers
SmartGWT LGPL 2010-08-17
Comment