标题:代码添加窗体,无法设置格式
只看楼主
aroffice
Rank: 1
等 级:新手上路
帖 子:39
专家分:0
注 册:2011-9-23
结帖率:92.31%
已结贴  问题点数:20 回复次数:3 
代码添加窗体,无法设置格式
使用代码添加了一个表单,然后想修改里面的字体等信息,但修改字号好像无法调整显示的大小
tsxx="提示信息"
msgjg=2
PUBLIC OFORM1
OFORM1=NEWOBJECT("form1")
OFORM1.SHOW
DEFINE CLASS FORM1 AS FORM

    TOP = 0
    LEFT = 0
    HEIGHT =147
    WIDTH = 528
    SHOWWINDOW = 1
    DOCREATE = .T.
    CAPTION = "系统提示"
    WINDOWTYPE = 1
    NAME = "form1"
    ALWAYSONTOP=.T.
    AUTOCENTER=.T.
    BORDERSTYLE=0
    CLOSABLE=.t.
    minbutton=.f.
    maxbutton=.f.
    CONTROLBOX=.t.


        
    ADD OBJECT Label1 AS Label WITH ;
        TOP = 15, ;
        LEFT = 70, ;
        HEIGHT = 60, ;
        WIDTH = 450, ;
        fontsize=12
        &&不能设置字体大小,更改这个字号感觉无效
    ADD OBJECT Commandyes AS Commandbutton WITH ;
        TOP = 100, ;
        LEFT = 270, ;
        HEIGHT = 40, ;
        WIDTH = 80, ;
        Caption="是"
        fontsize=12

    PROCEDURE Commandyes.click
        msgjg=6
        THISFORM.RELEASE
    ENDPROC

    ADD OBJECT Commandno AS Commandbutton WITH ;
        TOP = 100, ;
        LEFT = 400, ;
        HEIGHT = 40, ;
        WIDTH = 80, ;
        Caption="否"
        fontsize=12

    PROCEDURE Commandno.click
        msgjg=7
        THISFORM.RELEASE
    ENDPROC
   
ENDDEFINE
搜索更多相关主题的帖子: OBJECT 代码 添加 TOP LEFT 
2021-10-28 09:30
laowan001
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:54
帖 子:802
专家分:1914
注 册:2015-12-30
得分:0 
试试  Visible=.T.
2021-10-28 09:42
吹水佬
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:432
帖 子:10064
专家分:41463
注 册:2014-5-20
得分:10 
有效的



2021-10-28 11:22
mywisdom88
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:190
帖 子:3125
专家分:8340
注 册:2015-3-25
得分:10 
以下是引用aroffice在2021-10-28 09:30:59的发言:

使用代码添加了一个表单,然后想修改里面的字体等信息,但修改字号好像无法调整显示的大小
tsxx="提示信息"
msgjg=2
PUBLIC OFORM1
OFORM1=NEWOBJECT("form1")
OFORM1.SHOW
DEFINE CLASS FORM1 AS FORM

    TOP = 0
    LEFT = 0
    HEIGHT =147
    WIDTH = 528
    SHOWWINDOW = 1
    DOCREATE = .T.
    CAPTION = "系统提示"
    WINDOWTYPE = 1
    NAME = "form1"
    ALWAYSONTOP=.T.
    AUTOCENTER=.T.
    BORDERSTYLE=0
    CLOSABLE=.t.
    minbutton=.f.
    maxbutton=.f.
    CONTROLBOX=.t.


        
    ADD OBJECT Label1 AS Label WITH ;
        TOP = 15, ;
        LEFT = 70, ;
        HEIGHT = 60, ;
        WIDTH = 450, ;
        fontsize=12
        &&不能设置字体大小,更改这个字号感觉无效
    ADD OBJECT Commandyes AS Commandbutton WITH ;
        TOP = 100, ;
        LEFT = 270, ;
        HEIGHT = 40, ;
        WIDTH = 80, ;
        Caption="是"
        fontsize=12

    PROCEDURE Commandyes.click
        msgjg=6
        THISFORM.RELEASE
    ENDPROC

    ADD OBJECT Commandno AS Commandbutton WITH ;
        TOP = 100, ;
        LEFT = 400, ;
        HEIGHT = 40, ;
        WIDTH = 80, ;
        Caption="否"
        fontsize=12

    PROCEDURE Commandno.click
        msgjg=7
        THISFORM.RELEASE
    ENDPROC
   
ENDDEFINE


ADD OBJECT Commandyes AS Commandbutton WITH ;
        TOP = 100, ;
        LEFT = 270, ;
        HEIGHT = 40, ;
        WIDTH = 80, ;
        Caption="是" , ;
        fontsize=12

缺少红色的东西
收到的鲜花
  • sam_jiang2021-10-28 15:44 送鲜花  1朵  
2021-10-28 12:44



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




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

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