【问题标题】:How to set a ScrollBar to the VerticalFieldManager in Blackberry?如何在 Blackberry 中将 ScrollBar 设置为 VerticalFieldManager?
【发布时间】:2009-07-17 07:18:05
【问题描述】:

我正在使用此代码将滚动条设置为 Blackberry 中的 VerticalFieldManager

   VerticalFieldManager temp2=new VerticalFieldManager(VerticalFieldManager.VERTICAL_SCROLL);
   LabelField result=new LabelField("Result \n Result\n Result\n Result \n Result\n");   
   temp2.add(result);

添加了 labelField 并且 VerticalFieldManager 显示的内容没有滚动。我的代码是否正确?如果有人有任何想法来处理这个问题,请帮助我。

【问题讨论】:

    标签: blackberry


    【解决方案1】:
     1. Set VerticalFieldManager style to VERTICAL_SCROLL|VERTICAL_SCROLLBAR    
     2. Add a new NullField(Field.FOCUSABLE) after LabelField
    

    【讨论】:

      【解决方案2】:

      我的解决方案:

      VerticalFieldManager temp2=new VerticalFieldManager(Manager.VERTICAL_SCROLL);
      LabelField result=new LabelField("Result \n Result\n Result\n Result \n Result\n",FOCUSABLE);   
      temp2.add(result);
      VerticalFieldManager temp=new VerticalFieldManager();
      temp.add(temp2);
      add(temp);
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2015-02-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-02-08
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多