Combobox在android中无法正确显示

时间:2015-12-02 11:51:35

标签: android livecode

我有一个组合框可以在Windows独立版中正常工作,但在Android中,下拉菜单覆盖整个屏幕左上角的项目。

我需要做些什么来使组合框下拉框留在它下面

这是组合框背后的代码

on textChanged

   put  the label of me into tlabel
   put me into tlist
   filter lines of tlist with tlabel into tfilter

   if tfilter=empty then 

      answer tlabel && "is not a valid entry." & return &  "You must enter M or F"
      undo

   else

      set the label of me to tfilter

      end if

end textChanged

1 个答案:

答案 0 :(得分:0)

使用带有以下脚本的普通按钮,而不是使用组合框:

on mouseUp
  put the text of btn "Your Old Combo Box" into myList
  if the cUsersChoice of me is an integer then
    put the cUsersChoice of me into myInitialChoice
  else put 0 into myInitialChoice
  mobilePick myList, myInitialChoice
  put the result into myUsersChoice
  if myUsersChoice is an integer and myUsersChoice > 0 then
    set the cUsersChoice of me to myUsersChoice
  end if
end mouseUp

这并不能完全符合您的要求,但在Android 4及更高版本上看起来应该会更好。 (在Android 2上看起来一样,我不确定3)。