| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 617 人关注过本帖
标题:文本框显示问题
取消只看楼主 加入收藏
tjdeming
Rank: 2
等 级:论坛游民
帖 子:429
专家分:54
注 册:2013-3-4
结帖率:90.14%
收藏
已结贴  问题点数:20 回复次数:4 
文本框显示问题
9898.rar (2.11 KB)
求助各位:想解决文本框显示问题:计算结果显示在文本框中,数据要 显示为整数,若是0 则文本框不显示。
如何做到?
搜索更多相关主题的帖子: 文本框 结果 显示 整数 不显示 
2023-09-08 21:58
tjdeming
Rank: 2
等 级:论坛游民
帖 子:429
专家分:54
注 册:2013-3-4
收藏
得分:0 
回复 2楼 sdta
谢谢你,试了点击计算后没有反应
图片附件: 游客没有浏览图片的权限,请 登录注册
我用的是vfp6.0
2023-09-09 09:27
tjdeming
Rank: 2
等 级:论坛游民
帖 子:429
专家分:54
注 册:2013-3-4
收藏
得分:0 
回复 6楼 sdta
程序代码:
 For FSQ =1 to 6
           FS="fsq"+allt(str(FSQ))
            h="text"+Allt(Str(FSQ))+"."
            ThisForm.&h.Value=iif(val(fs)=0, "", &FS)
     endfor       
还是没有反应
2023-09-09 12:26
tjdeming
Rank: 2
等 级:论坛游民
帖 子:429
专家分:54
注 册:2013-3-4
收藏
得分:0 
程序代码:
PUBLIC oform1

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

DEFINE CLASS form1 AS form
    DoCreate = .T.
    Caption = "Form1"
    Name = "Form1"

    ADD OBJECT command1 AS commandbutton WITH ;
        Top = 12, ;
        Left = 54, ;
        Height = 36, ;
        Width = 157, ;
        Caption = "计算", ;
        Name = "Command1"
    ADD OBJECT text1 AS textbox WITH ;
        FontName = "楷体", ;
        FontSize = 12, ;
        Format = "", ;
        Height = 37, ;
        Left = 48, ;
        Top = 84, ;
        Width = 121, ;
        ForeColor = RGB(255,0,0), ;
        Name = "Text1"
    ADD OBJECT text2 AS textbox WITH ;
        FontName = "楷体", ;
        FontSize = 12, ;
        Format = "", ;
        Height = 37, ;
        Left = 48, ;
        Top = 144, ;
        Width = 121, ;
        ForeColor = RGB(255,0,0), ;
        Name = "Text2"
    ADD OBJECT text3 AS textbox WITH ;
        FontName = "楷体", ;
        FontSize = 12, ;
        Format = "", ;
        Height = 37, ;
        Left = 240, ;
        Top = 84, ;
        Width = 121, ;
        ForeColor = RGB(255,0,0), ;
        Name = "Text3"
    ADD OBJECT text4 AS textbox WITH ;
        FontName = "楷体", ;
        FontSize = 12, ;
        Format = "", ;
        Height = 37, ;
        Left = 240, ;
        Top = 156, ;
        Width = 121, ;
        ForeColor = RGB(255,0,0), ;
        Name = "Text4"


    ADD OBJECT text5 AS textbox WITH ;
        FontName = "楷体", ;
        FontSize = 12, ;
        Format = "", ;
        Height = 36, ;
        Left = 48, ;
        Top = 204, ;
        Width = 120, ;
        ForeColor = RGB(255,0,0), ;
        Name = "Text5"


    ADD OBJECT text6 AS textbox WITH ;
        FontName = "楷体", ;
        FontSize = 12, ;
        Format = "", ;
        Height = 34, ;
        Left = 240, ;
        Top = 206, ;
        Width = 121, ;
        ForeColor = RGB(255,0,0), ;
        Name = "Text6"


    ADD OBJECT command2 AS commandbutton WITH ;
        Top = 12, ;
        Left = 244, ;
        Height = 37, ;
        Width = 121, ;
        Caption = "关闭", ;
        Name = "Command2"


    PROCEDURE command1.Click

        set talk off
        use jj
        Sum 病假,事假,婚假,丧假,探亲,旷工;
            to fsq1,fsq2,fsq3,fsq4,fsq5,fsq6
        *!*      For FSQ = 1 to 6
        *!*            FS="fsq"+allt(str(FSQ))
        *!*             h="text"+Allt(Str(FSQ))+"."
        *!*          ThisForm.&h.Value=int(&FS)
        *!*      endfor      
            
             For  FSQ =1 to 6
                    FS="fsq" +allt(str(FSQ))
                     h="text"+Allt(Str(FSQ))+"."
                 ThisForm.&h.Value=iif(val(fs)=0, "", &FS)
             endfor      
    ENDPROC


    PROCEDURE command2.Click
        quit
    ENDPROC


ENDDEFINE

2023-09-09 14:19
tjdeming
Rank: 2
等 级:论坛游民
帖 子:429
专家分:54
注 册:2013-3-4
收藏
得分:0 
回复 10楼 吹水佬
图片附件: 游客没有浏览图片的权限,请 登录注册
图片附件: 游客没有浏览图片的权限,请 登录注册
2023-09-09 15:27
快速回复:文本框显示问题
数据加载中...
 
   



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

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