wcx6298 / smartgwt

Automatically exported from code.google.com/p/smartgwt
0 stars 0 forks source link

IMenuButton Styling problem #602

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am using SmartGWT 2.4
Browser: Chrome 12

Insert the following code in the onModuleLoad:
public void onModuleLoad() {
        Menu menu = new Menu();
        MenuItem newItem = new MenuItem("New", "");
        menu.setItems(newItem);
        IMenuButton iMBtn = new IMenuButton("aaaaa",menu);
        //iMBtn.setBaseStyle("Test_Boarder");
        //iMBtn.setStyleName("Test_Boarder");
        //iMBtn.setStylePrimaryName("Test_Boarder");
        //iMBtn.setBackgroundColor("solid red");
        //iMBtn.setBackgroundColor("red");
        iMBtn.draw();
    }

CSS:
.Test_Boarder {
    border-left: none;
    border-top: none;
    border-bottom: none;
    border-right: none;
    border-color: red;
    background-color: blue;
    }
HTML Page:
<!doctype html>
<!-- The DOCTYPE declaration above will set the    -->
<!-- browser's rendering engine into               -->
<!-- "Standards Mode". Replacing this declaration  -->
<!-- with a "Quirks Mode" doctype may lead to some -->
<!-- differences in layout.                        -->

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

    <!--                                                               -->
    <!-- Consider inlining CSS to reduce the number of requested files -->
    <!--                                                               -->
    <link type="text/css" rel="stylesheet" href="TEST_Componant.css">

    <!--                                           -->
    <!-- Any title is fine                         -->
    <!--                                           -->
    <title>Web Application Starter Project</title>

    <!--                                           -->
    <!-- This script loads your compiled module.   -->
    <!-- If you add any GWT meta tags, they must   -->
    <!-- be added before this line.                -->
    <!--                                           -->
    <script type="text/javascript" language="javascript" src="test_componant/test_componant.nocache.js"></script>
  </head>

  <!--                                           -->
  <!-- The body can have arbitrary html, or      -->
  <!-- you can leave the body empty if you want  -->
  <!-- to create a completely dynamic UI.        -->
  <!--                                           -->
  <body>

    <!-- OPTIONAL: include this if you want history support -->
    <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>

    <!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
    <noscript>
      <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
        Your web browser must have JavaScript enabled
        in order for this application to display correctly.
      </div>
    </noscript>

  </body>
</html>

What is the expected output? What do you see instead?
The ImenuButton Style or background changes but the IMenuButton appears without 
changing in the backgroundColor or style

What version of the product are you using? On what operating system?
smartGWT 2.4

What browser(s) does this happen in?  Are there any browsers where the
issue does not occur?
Chrome 12, I tried also in FF 4 the same output

Please provide any additional information below.

NOTE: I tried the commented commands in the onModuleLoad (each of them alone) 
but the output still the same.

NOTE:There is alot of Widgets the have the same issue (HLayout does not take 
border-color-bottom Styling).

Please advise me?

Thanks

Original issue reported on code.google.com by ahmad.kh...@exalt.ps on 6 Jul 2011 at 9:41

GoogleCodeExporter commented 9 years ago
IMenuButton is based on StretchImg in some skins, which means it has 
image-based styling not CSS styling.

Please do not open issues here unless you have first posted to the forums and 
had your issue verified as a real issue.

Original comment by smartgwt...@gmail.com on 6 Jul 2011 at 6:06

GoogleCodeExporter commented 9 years ago
Thanks for your quick response.

I will be thankful if you advise me for some resources (in CSS with smartGWT) 
since i have an issue in this field.

Original comment by ahmad.kh...@exalt.ps on 7 Jul 2011 at 6:02