【问题标题】:smartgwt - problem with labelssmartgwt - 标签问题
【发布时间】:2010-07-12 16:43:12
【问题描述】:

一个多月前,我在http://forums.smartclient.com/index.php发布了以下问题,但没有人回答:

我使用来自展示的以下代码:

public void onModuleLoad() {  

            Canvas canvas = new Canvas();  

            DragLabel dragTranslucent = new DragLabel("Translucent", 50);  
            dragTranslucent.setDragAppearance(DragAppearance.TARGET);  
            dragTranslucent.setDragOpacity(60);  
            canvas.addChild(dragTranslucent);  

            DragLabel dragShadow = new DragLabel("Shadow", 200);  
            dragShadow.setDragAppearance(DragAppearance.TARGET);  
            dragShadow.setShowDragShadow(true);  
            //TODO: dragShadow.setDragShadowDepth(8);  
            canvas.addChild(dragShadow);  

            DragLabel dragOutline = new DragLabel("Outline", 350);  
            dragOutline.setLeft(350);        
            dragOutline.setDragAppearance(DragAppearance.OUTLINE);  
            canvas.addChild(dragOutline);  

            canvas.draw();  
        }  

        public static class DragLabel extends Label {  
            public DragLabel(String contents, int left) {  
                setTop(50);  
                setLeft(left);  
                setContents(contents);  
                setAlign(Alignment.CENTER);  
                setPadding(4);  
                setShowEdges(true);  
                setBackgroundColor("#EEEEEE");  
                setKeepInParentRect(true);  
                setCanDragReposition(true);      
            }  
} 

这是结果(抱歉链接,但我没有任何声誉点):

i47.tinypic.com/9rsqae.jpg

但是,我应该得到这样的东西(来自陈列柜):

i49.tinypic.com/11l670p.jpg

问题涉及 Firefox 和 chrome。有人知道怎么解决吗?

提前致谢。

【问题讨论】:

    标签: smartgwt


    【解决方案1】:

    我只是在寻找 Drag Objects 时发现了这个。

    这可能很奇怪,但是当我品尝它时,我得到了下面链接的结果。

    i49.tinypic.com/11l670p.jpg

    【讨论】:

      【解决方案2】:

      我通过将 html 文件中的 <!doctype html> 放入 cmets 解决了这个问题。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2012-05-16
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多