Sure!
Java:
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.TabPanel;
import com.google.gwt.user.client.ui.TextBox;
public class SearchPanel {
public TabPanel tabPanel = null;
public HorizontalPanel searchPanel = null;
public SearchPanel() {
}
public TabPanel init() {
searchPanel = new HorizontalPanel();
tabPanel = new TabPanel();
setProperties();
Button btn = new Button( "search" );
HTML advanced = new HTML( "<a href=\"#\">advanced</a>" );
searchPanel.add( btn );
searchPanel.add( advanced );
tabPanel.add( searchPanel, "A title" );
tabPanel.selectTab( 0 );
return tabPanel;
}
private void setProperties() {
searchPanel.setSpacing( Constant.SPACING );
searchPanel.setVerticalAlignment( HorizontalPanel.ALIGN_MIDDLE
);
}
}
CSS:
.gwt-Button {
font-size: 2pt;
width: 300pt;
}
That's it... As you can see not such a big deal, but it's not
working... *confused*
By the way, the width is working fine.
On Jun 17, 4:17 pm, Ian Bambury <[email protected]> wrote:
> Sounds like it's your code then, rather than your machine :-)
> Can you post the code and the css for a trivial example?
>
> Ian
>
> http://examples.roughian.com
>
> 2009/6/17 Dariusz <[email protected]>
>
>
>
> > > The results on the other machine were the same as the results on your
> > > machine (i.e. different sizes in different browsers),
> > Yes.
>
> > Which means, that on IE the button was bigger than on FF.
>
> > On Jun 17, 4:08 pm, Ian Bambury <[email protected]> wrote:
> > > I'm not quite clear -
>
> > > > It's weird though, I tried others code and it looks the same. I even
> > ran
> > > > the app on different PC and the result was the same...
>
> > > The results on the other machine were the same as the results on your
> > > machine (i.e. different sizes in different browsers), or the results on
> > the
> > > other machine were the same for both browsers (i.e. what you wanted but
> > only
> > > when run on the other machine)?
>
> > > Ian
>
> > >http://examples.roughian.com
>
> > > 2009/6/17 Dariusz <[email protected]>
>
> > > > Thanks for your response. Unfortunately, it's still not working; even
> > > > not with x-small. Funny though, if I'm using any other properties like
> > > > 'width' it is working, but not this damn font size... :( I just want
> > > > to make this stupid button smaller, so it looks similar to the one in
> > > > FF.
>
> > > > On Jun 17, 1:47 pm, Ian Bambury <[email protected]> wrote:
> > > > > Try using anything other than px. px-sizing has accessibility issues
> > for
> > > > a
> > > > > start. Browsers *should* show them as that exact number of pixels
> > > > (mostly),
> > > > > but because users with then can't resize them, newer browsers allow
> > users
> > > > to
> > > > > resize and might well do their own thing if you use px. In the case
> > where
> > > > > pixel density is dramatically different from standard, browsers are
> > > > required
> > > > > to change the display size. Imagine what would happen if a super-HD
> > > > monitor
> > > > > of 960ppi came out, you would have 96 characters per inch the way you
> > are
> > > > > doing it.
> > > > > Even if you don't care about people with accessibility problems, it
> > is a
> > > > > good idea to use something else, like x-small, or 80%.
> > > > > Ian
>
> > > > >http://examples.roughian.com
>
> > > > > 2009/6/17 Dariusz <[email protected]>
>
> > > > > > Thanks Alex,
>
> > > > > > Yes, I can minimize it, but by default the Button in IE is much
> > bigger
> > > > > > than in FF and hell I can't change the font-size for IE. It's just
> > not
> > > > > > working...
>
> > > > > > It's weird though, I tried others code and it looks the same. I
> > even
> > > > > > ran the app on different PC and the result was the same...
>
> > > > > > Strange!
>
> > > > > > On Jun 17, 9:20 am, "alex.d" <[email protected]>
> > wrote:
> > > > > > > It's probably your user font settings in FF or IE that are making
> > > > font
> > > > > > > bigger or smaller. Press Ctrl and scroll mouse wheel.
>
> > > > > > > On 16 Jun., 22:03, Dariusz <[email protected]> wrote:
>
> > > > > > > > This is weird... :(
>
> > > > > > > > This:
> > > > > > > > .gwt-Button {
> > > > > > > > width: 300px;
>
> > > > > > > > }
>
> > > > > > > > works fine, but not if I want to change the font-size??
>
> > > > > > > > On Jun 16, 9:41 pm, Dariusz <[email protected]> wrote:
>
> > > > > > > > > I did setup a style.css file, where I'm trying to change the
> > size
> > > > of
> > > > > > > > > the button like this:
>
> > > > > > > > > .gwt-Button {
> > > > > > > > > border:1px outset #CCCCCC;
> > > > > > > > > cursor: pointer;
> > > > > > > > > font-size:10px;
> > > > > > > > > margin:0pt;
> > > > > > > > > padding:3px 5px;
> > > > > > > > > text-decoration:none;
>
> > > > > > > > > }
>
> > > > > > > > > Unfortunately, no effect on the result...it's still bigger
> > than
> > > > in
> > > > > > FF.
>
> > > > > > > > > On Jun 16, 8:57 pm, Dariusz Borowski <[email protected]>
> > > > wrote:
>
> > > > > > > > > > Does anyone know, why I'm having a different layout in IE
> > than
> > > > in
> > > > > > FF?
>
> > > > > > > > > > Please, check out my attached screenshots.
>
> > > > > > > > > > ie.jpg
> > > > > > > > > > 4KViewDownload
>
> > > > > > > > > > ff.jpg
> > > > > > > > > > 3KViewDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" 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/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---