English 中文(简体)
我如何通过方案拟订来点击Infinit一个Infinit子?
原标题:How do I click a button contained in a InfiniteContainer by programming?

I have a form with an InfiniteContainer(bodyCnt) which contains 3 buttons.

所有3个县都有自己的客户财产。

我展示了这种形式,并在与客户财产挂钩的体内寻找一个纽扣区=通过方案拟订进行搜索。

Button btn = (Button)(findTranTag(bodyCnt,"search_tag"));
btn.pressed();
btn.released();
Dialog dlg = new Dialog("search_tag button Clicked");
dlg.showPopupDialog(btn);

public Component findTranTag(InfiniteContainer bodyCnt, String search_tag){
    if (bodyCnt==null){
        return null;
    }
    System.out.println(bodyCnt.getComponentCount());
    for (int i=0; i<bodyCnt.getComponentCount();i++){
        if (bodyCnt.getComponentAt(i).getClientProperty("tag")!=null){
            if (bodyCnt.getComponentAt(i).getClientProperty("tag").equals(search_tag)){
                return bodyCnt.getComponentAt(i);
            }
        }
    }
    return null;
}

如果我以方案方式显示这种形式,点击 but一个县,则尸体Cnt.getComponentCount() 1. 总是回返。

如果我用手方式点击一个纽州,则保证金Cnt.getComponentCount()返回3。

我如何请“无限承诺”组织把所有儿童装上节目,以进行搜查?

它在点击ton子做些事与迫使()+() a子做事之间有分歧。

问题回答

。 通知你看到的一个组成部分是,当你到达边缘时,我们用来填充该集装箱的特别案例标记。

由于你从未见过<条码>无限集装箱,标记部件赢得了tetch组件,集装箱将有效空出。

您可以援引:continueFetching ( on the miteContainer,但你没有标准活动来表明最初的一组部件是在背景中运行之后到达的。

然而,由于你执行这种呼吁,你能够在第一任告终时,以你逻辑为依托,提供你自己的卑鄙事件。





相关问题
Codename One: Issue with .createMedia method and audio files

I m trying to make an audio player for a game using Codename One but I ve been running into issues with the .createMedia method. public class AudioPlayer { private Media MEDIA = null; public Media ...

• 在《刑法》中宣传一

我正在用“一号法典”为移动打上 j球,并试图利用另一个透镜在框架中形成声器。 我陷入许多麻烦,主要是......。

How to change right side menu icon size in cn1?

I couldn t figure out how to customize it(change the size, color...) of the menu icon (3 horizontal lines). It s small, I need to increase the size. I saw this question How to change menu icon size in ...

How do I send an event to a component?

I have a button btn that doSomething() in response to a long-pressed event. Button btn = new Button("do Something button"); btn.addLongPressListener(new ActionListener(){ @...

Codename One - Upgrade to JDK 11

I m seeing the following error after upgrading the project to JDK 11. I have updated the CN1 Libraries from Extension Manager already and codename settings (codename1.arg.java.version=11) file with ...

热门标签