2

プルライトクラスが設定されているボタンにツールチップ/ポップオーバーを作成しようとしています(プルライトは基本的にフローを右に設定します)。左に配置しようとすると、ツールチップ/ポップオーバーがクラッシュします。提案/ヘルプはありますか?

 /* The widget updateStatusDate is a button that floats right*/     
Tooltip tooltip = new Tooltip("Date : " + timeOfOperation + " Comment : " + comment); 
setUpdateStatusDate("Last Updated by : " + userName);    
tooltip.setWidget(updateStatusDate); tooltip.setPlacement(Placement.LEFT);     
tooltip.reconfigure();
4

1 に答える 1

0

あなたのコードが与えられたので、その簡略化されたバージョンをプロジェクトに入れましたが、問題なく動作します。プロジェクトにコピーして、動作するかどうかを確認できます。

@Override
public void onModuleLoad() {

    // essentials from questioned code
    Tooltip tooltip = new Tooltip("text");
    Button updateStatusDate = new Button("test button");

    tooltip.setWidget(updateStatusDate);
    tooltip.setPlacement(Placement.LEFT);
    tooltip.reconfigure();

    // change style for the rootPanel, so the button flows to the center
    // it is just for fast and short code example, do not do this in your regular project
    com.google.gwt.dom.client.Style.TextAlign center = TextAlign.CENTER;
    RootPanel.get().getElement().getStyle().setTextAlign(center);

    //add button
    RootPanel.get().add(updateStatusDate);
}

Bootstrap のバージョンは 2.3.2.0-SNAPSHOT で、GWT のバージョンは 2.5.1 です。

于 2013-11-02T20:14:23.377 に答える