( NumWind : Byte; NumObj : Word; Mode : Word; Idx : Word; Data : ...)
Nastavuje vlastnosti objektů během jejich zobrazení. Co se nastavuje, řídí parametr Mode.
Mode | Popis |
OPROP_ENABLE |
Enable / Disable objektu. Data = true = Enable |
OPROP_READONLY |
Read only objektu. Data = true = ReadOnly |
OPROP_SHOW |
Zobrazení / Skrytí objektu Data = true = Show |
OPROP_FONT_BOLD |
Tučné / Normální písmo Data = true = Tučné |
Parametr Idx je potřeba u objektů, jako je Ins_CheckBox, který obsahuje více objektů. Pak je to index s rozsahem 1...n.
Podívejte se na: Objekty
Příklad:
procedure Test_SetObjProc dim Comm : Word; WInit(10,0,0,74,09,"",15,0); Ins_Longint(10, 10, 01,01,10,02, 7, 0,0); Ins_CheckBox(10, 20, 12,01,20,05, 7, "aaa", "bbb", "ccc"); Ins_Button(10, 30, 21,01,35,03, "Test", 0, 1); Ins_Button(10, 100, 01,06,15,08, "Disable", 150, 0); Ins_Button(10, 110, 01,08,15,10, "Enable", 151, 0); Ins_Button(10, 120, 16,06,30,08, "ReadOnly ON", 152, 0); Ins_Button(10, 130, 16,08,30,10, "ReadOnly OFF", 153, 0); Ins_Button(10, 140, 31,06,45,08, "Show OFF", 154, 0); Ins_Button(10, 150, 31,08,45,10, "Show ON", 155, 0); Ins_Button(10, 160, 46,06,60,08, "Bold ON", 156, 0); Ins_Button(10, 170, 46,08,60,10, "Bold OFF", 157, 0); WOpen(10); repeat Comm := _Execute(10); ExitIf Comm = cmCancel then EndExit if Comm = 150 then SetObjProp(10, 10, OPROP_ENABLE, 0, false); SetObjProp(10, 20, OPROP_ENABLE, 1, false); SetObjProp(10, 30, OPROP_ENABLE, 0, false); else if Comm = 151 then SetObjProp(10, 10, OPROP_ENABLE, 0, true); SetObjProp(10, 20, OPROP_ENABLE, 1, true); SetObjProp(10, 30, OPROP_ENABLE, 0, true); else if Comm = 152 then SetObjProp(10, 10, OPROP_READONLY, 0, true); SetObjProp(10, 20, OPROP_READONLY, 1, true); SetObjProp(10, 30, OPROP_READONLY, 0, true); else if Comm = 153 then SetObjProp(10, 10, OPROP_READONLY, 0, false); SetObjProp(10, 20, OPROP_READONLY, 1, false); SetObjProp(10, 30, OPROP_READONLY, 0, false); else if Comm = 154 then SetObjProp(10, 10, OPROP_SHOW, 0, false); SetObjProp(10, 20, OPROP_SHOW, 1, false); SetObjProp(10, 30, OPROP_SHOW, 0, false); else if Comm = 155 then SetObjProp(10, 10, OPROP_SHOW, 0, true); SetObjProp(10, 20, OPROP_SHOW, 1, true); SetObjProp(10, 30, OPROP_SHOW, 0, true); else if Comm = 156 then SetObjProp(10, 10, OPROP_FONT_BOLD, 0, true); SetObjProp(10, 15, OPROP_FONT_BOLD, 0, true); SetObjProp(10, 20, OPROP_FONT_BOLD, 1, true); SetObjProp(10, 30, OPROP_FONT_BOLD, 0, true); else if Comm = 157 then SetObjProp(10, 10, OPROP_FONT_BOLD, 0, false); SetObjProp(10, 15, OPROP_FONT_BOLD, 0, false); SetObjProp(10, 20, OPROP_FONT_BOLD, 1, false); SetObjProp(10, 30, OPROP_FONT_BOLD, 0, false); else endif endif endif endif endif endif endif endif until false; WClose(10); endproc