checkbox problem on enabling/disabling
736053Dec 1 2009 — edited Dec 1 2009Hello friends!
I'm having trouble with two check boxes. Initially the first is enabled and unchecked while the second is disabled and also unchecked. When each are clicked the sysdate is entered in the corresponding columns in my database table. I want to make them clickable only once and remain checked after that.
The problem: when i click the first the sysdate is inserted in my table and the box is checked but it doesnt get disabled. After it is clicked the second check box is enabled as it should and becomes chekable. Then i click the second, the sysdate is inserted in my table, the first checkbox is disabled but second still remains clickable. Bottom line: current checkbox doesnt respond to disabling(i tried both ways, through ENABLED FALSE and DISABLED TRUE, actually DISABLED property was even more 'hazardeous').
Both checkboxes are on WHEN-CHECKBOX-CHANGED triggers.
CODE for first checkbox(CHECK_SOSIRE):
begin
UPDATE vizite i SET i.sosire=sysdate WHERE i.cnp_vizitator=:bloc_portar.cnp; commit;
SET_ITEM_PROPERTY('CHECK_PLECARE', ENABLED, PROPERTY_TRUE);
end;
CODE for second checkbox(CHECK_PLECARE):
begin
UPDATE vizite i SET i.plecare=sysdate WHERE i.cnp_vizitator=:bloc_portar.cnp; commit;
SET_ITEM_PROPERTY('CHECK_SOSIRE', ENABLED, PROPERTY_FALSE);
SET_ITEM_PROPERTY('CHECK_PLECARE', ENABLED, PROPERTY_FALSE);
end;
Thx,
Iulian