下拉列表值怎么写?

WoJoJo 2008-01-22 10:10:57
下拉列表中的值怎么写进去啊?
我是菜鸟,望高手们帮忙!!
...全文
105 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
worldly_wind 2008-01-22
  • 打赏
  • 举报
回复
看属性-Items就知道了
青锋-SS 2008-01-22
  • 打赏
  • 举报
回复
是数据窗口的下拉列表还是诸如DropDownListBox等的下拉列表?
dawugui 2008-01-22
  • 打赏
  • 举报
回复
This example adds the item Edit File to the ListBox lb_Actions:

integer rownbr

string s

s = "Edit File"

rownbr = lb_Actions.AddItem(s)

If lb_Actions contains Add and Run and the Sorted property is FALSE, the statement above returns 3 (because Edit File becomes the third and last item). If the Sorted property is TRUE, the statement above returns 2 (because Edit File becomes the second item after the list is sorted alphabetically).
dawugui 2008-01-22
  • 打赏
  • 举报
回复
Description

Adds a new item to the list of values in a list box.

Controls

ListBox and DropDownListBox controls

Syntax

listboxname.AddItem ( item )

Argument Description
listboxname The name of the ListBox or DropDownListBox in which you want to add an item
item A string whose value is the text of the item you want to add
Return value

Integer. Returns the position of the new item. If the list is sorted, the position returned is the position of the item after the list is sorted. Returns -1 if it fails. If any argument's value is NULL, AddItem returns NULL.

Usage

If the ListBox already contains items, AddItem adds the new item to the end of the list. If the list is sorted (its Sorted property is TRUE), PowerBuilder re-sorts the list after the item is added.
A list can have duplicate items. Items in the list are tracked by their position in the list, not their text.
AddItem and InsertItem do not update the Items property array. You can use FindItem to find items added during execution.


Adding many items to a list with a horizontal scrollbar If a ListBox or the ListBox portion of a DropDownListBox will have a large number of items and you want to display an HScrollBar, call the SetRedraw function to turn Redraw off, add the items, call SetRedraw again to set Redraw on, and then set the HScrollBar property to TRUE. Otherwise, it may take longer than expected to add the items.
dawugui 2008-01-22
  • 打赏
  • 举报
回复
lb_1.Additem
leio 2008-01-22
  • 打赏
  • 举报
回复
PB联机帮助查Additem

This example adds the item Edit File to the ListBox lb_Actions:

integer rownbr

string s

s = "Edit File"

rownbr = lb_Actions.AddItem(s)

WoJoJo 2008-01-22
  • 打赏
  • 举报
回复
是不是应该用游标??

1,108

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧