Hi,

I am using GWT flex table and Decorator panel to do this:

refer my code below:

*

import* com.google.gwt.user.client.ui.RootPanel;

*

import* com.google.gwt.user.client.ui.DecoratorPanel;
*

import* com.google.gwt.user.client.ui.FlexTable;
*

import* com.google.gwt.user.client.ui.HasHorizontalAlignment;
*

import* *com.google.gwt.user.client.ui.HasVerticalAlignment*;
*

import* com.google.gwt.user.client.ui.HorizontalPanel;
*

import* com.google.gwt.user.client.ui.Label;
*

import* com.google.gwt.user.client.ui.VerticalPanel;
*

import* *com.google.gwt.user.client.ui.Widget*;
*

import* com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
*

import* *
com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant
*;

*public* *void* onModuleLoad()

{

FlexTable searchCriteriaLayout = *new* FlexTable();

searchCriteriaLayout.setCellSpacing(15);

FlexCellFormatter cellFormatter =
searchCriteriaLayout.getFlexCellFormatter();

// Add a title to the form

searchCriteriaLayout.setHTML(0, 0, "XYZ Application");

cellFormatter.setColSpan(0, 0, 2);

cellFormatter.setHorizontalAlignment(0, 0, HasHorizontalAlignment.*
ALIGN_CENTER*);

searchCriteriaLayout.setWidget(1,0,displaySearchCriteriaPanel());

cellFormatter.setColSpan(1, 0, 2);

cellFormatter.setHorizontalAlignment(1, 0, HasHorizontalAlignment.*
ALIGN_CENTER*);

HorizontalPanel searchCriteriaHPanel=*new* HorizontalPanel();

searchCriteriaHPanel.add(searchCriteriaLayout);

searchCriteriaHPanel.setCellHorizontalAlignment(searchCriteriaLayout,HasHorizontalAlignment.
*ALIGN_CENTER*);

VerticalPanel headerVPanel=*new* VerticalPanel();

headerVPanel.add(searchCriteriaHPanel);

VerticalPanel mainPanel=*new* VerticalPanel();

mainPanel.setStyleName("transcript");

mainPanel.add(headerVPanel);

//Wrap the content in a DecoratorPanel

DecoratorPanel decPanel = *new* DecoratorPanel();

decPanel.setWidget(mainPanel);

RootPanel.*get*().add(decPanel);

}





On Mon, Mar 30, 2009 at 7:43 PM, Liang <[email protected]> wrote:

>
> really need help on this, please.
>
>
>
> On Mar 26, 4:39 pm, Liang <[email protected]> wrote:
> > Hi all,
> >
> > Does anyone know about setting text in the middle oftitleespecially
> > for FormPanel or Panel?
> > It seems to me thattitlecan not be customized.
>  > Any help or hints will be greatly appreciated!
> >
> > Regards.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to