现在有点小麻烦,是不知道他的房屋状态怎么反映,要琢磨一下他的数据才知道,今天没多少时间了,明天再弄。他的数据是刻意改乱的,有些问题不是那么好判断,所以我一直要真实数据就是这个原因。
授人以渔,不授人以鱼。
*--------------------------- * 住户信息显示控件 *--------------------------- DEFINE CLASS C_Household AS Container BorderWidth = 2 SpecialEffect = 0 _FontName = "微软雅黑" PROCEDURE _FontName_Assign(tcValue) IF VARTYPE(tcValue) != "C" tcValue = "微软雅黑" ENDIF WITH This ._FontName = tcValue .SetAll("FontName", ._FontName) ENDWITH ENDPROC _FontSize = 9 PROCEDURE _FontSize_Assign(tnValue) IF (VARTYPE(tnValue) != "N") .OR. (tnValue < 9) tnValue = 9 ENDIF WITH This ._FontSize = tnValue .Arrange ENDWITH ENDPROC _Width = 100 PROCEDURE _Width_Assign(tnValue) IF (VARTYPE(tnValue) != "N") .OR. (tnValue < 100) tnValue = 100 ENDIF WITH This ._Width = tnValue .Arrange ENDWITH ENDPROC _Height = 16 PROCEDURE _Height_Assign(tnValue) IF (VARTYPE(tnValue) != "N") .OR. (tnValue < 16) tnValue = 16 ENDIF WITH This ._Height = tnValue .Arrange ENDWITH ENDPROC * 房号 _Number = "" PROCEDURE _Number_Assign(tcValue) IF VARTYPE(tcValue) != "C" tcValue = "" ENDIF WITH This ._Number = tcValue .lbl_HouseNumber.Caption = ._Number ENDWITH ENDPROC * 户主名 _Name = "" PROCEDURE _Name_Assign(tcValue) IF VARTYPE(tcValue) != "C" tcValue = "" ENDIF WITH This ._Name = tcValue .lbl_HouseName.Caption = ._Name ENDWITH ENDPROC HIDDEN _Margin _Margin = 4 ADD OBJECT PROTECTED lbl_Title1 AS Label WITH Caption = "房号: ", Alignment = 1, Width = 50, Height = This._Height ADD OBJECT PROTECTED lbl_HouseNumber AS Label WITH Caption = This._Number, Alignment = 2, Width = This._Width, Height = This._Height ADD OBJECT PROTECTED lbl_Title2 AS Label WITH Caption = "户主名: ", Alignment = 1, Width = 50, Height = This._Height ADD OBJECT PROTECTED lbl_HouseName AS Label WITH Caption = This._Name, Alignment = 2, Width = This._Width, Height = This._Height PROCEDURE Arrange WITH This .SetAll("FontSize", ._FontSize) WITH .lbl_Title1 .Height = This._Height .Top = This._Margin .Left = This._Margin ENDWITH WITH This.lbl_HouseNumber .Width = This._Width .Height = This._Height .Top = This.lbl_Title1.Top .Left = This.lbl_Title1.Left + This.lbl_Title1.Width ENDWITH WITH This.lbl_Title2 .Height = This._Height .Top = This.lbl_Title1.Top + This.lbl_Title1.Height + This._Margin .Left = This._Margin ENDWITH WITH This.lbl_HouseName .Width = This._Width .Height = This._Height .Top = This.lbl_Title2.Top .Left = This.lbl_Title2.Left + This.lbl_Title1.Width ENDWITH .Width = .lbl_HouseNumber.Left + .lbl_HouseNumber.Width + ._Margin .Height = .lbl_HouseName.Top + .lbl_HouseName.Height + ._Margin ENDWITH ENDPROC PROCEDURE Resize This.Arrange ENDPROC ENDDEFINE