标题:combox 求助 (忘记了还给老师了)
只看楼主
mymailhou
Rank: 1
等 级:新手上路
帖 子:44
专家分:0
注 册:2017-1-10
结帖率:0
已结贴  问题点数:20 回复次数:2 
combox 求助 (忘记了还给老师了)
combox 选择 只有两个值“是  否”如何做?
搜索更多相关主题的帖子: 选择 老师 combox 
2022-05-27 15:47
zhken
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:11
帖 子:273
专家分:594
注 册:2012-9-21
得分:10 
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN


    **************************************************
*-- Form:         form1 (e:\xp2\aaa.scx)
*-- 父类:  form
*-- 基类:    form
*-- 时间戳:   05/27/22 05:50:01 PM
*
DEFINE CLASS form1 AS form


    DoCreate = .T.
    Caption = "Form1"
    Name = "Form1"


    ADD OBJECT command1 AS commandbutton WITH ;
        Top = 108, ;
        Left = 108, ;
        Height = 25, ;
        Width = 96, ;
        Caption = "实时添加COMBO", ;
        Name = "Command1"


    ADD OBJECT command2 AS commandbutton WITH ;
        Top = 12, ;
        Left = 300, ;
        Height = 25, ;
        Width = 61, ;
        Caption = "顾得白", ;
        Name = "Command2"


    PROCEDURE command1.Click
        thisform.AddObject("Quantity",   "ComboBox")
        thisform.Quantity.Visible   =.T.
        thisform.Quantity.rowsource='是,否,YES,NO'
        thisform.Quantity.rowsourcetype=1 &&1=值
        thisform.Quantity.style=2 &&2=下拉列表框
        thisform.Quantity.left=this.Left+this.Width+2
        thisform.Quantity.top=this.top
        this.Enabled=.f.
    ENDPROC


    PROCEDURE command2.Click
        thisform.Release
    ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
2022-05-27 17:53
laowan001
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:54
帖 子:802
专家分:1914
注 册:2015-12-30
得分:10 

('是')
('否')
= 1
2022-05-27 20:35



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-509185-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.026953 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved