Re: developer 2000 forms disable button

From: Brian West <bri345_at_yahoo.com>
Date: Sun, 24 Dec 2000 22:34:08 GMT
Message-ID: <925tl1$i73$1_at_nnrp1.deja.com>


Try not to limit functionality to solve a problem.

BEGIN

  • Navigate to some independent item (if possible), go_item('b1.t3');

   IF get_item_property('B1.b1',LABEL) = 'That'    THEN
      set_item_property('B1.b1',LABEL,'This');

      set_item_property('b1.t1',enabled,property_true);
      set_item_property('b1.t1',VISUAL_ATTRIBUTE, 'ENABLED');
      set_item_property('b1.t1',navigable,property_true);

      :b1.t2 := NULL;
      set_item_property('b1.t2',VISUAL_ATTRIBUTE, 'DISABLED');
      set_item_property('b1.t2',enabled,property_false);
   ELSE
      set_item_property('B1.b1',LABEL,'That');


      set_item_property('b1.t2',enabled,property_true);
      set_item_property('b1.t2',VISUAL_ATTRIBUTE, 'ENABLED');
      set_item_property('b1.t2',navigable,property_true);

      :b1.t1 := NULL;
      set_item_property('b1.t1',VISUAL_ATTRIBUTE, 'DISABLED');
      set_item_property('b1.t1',enabled,property_false);
   END IF;   go_item('b1.b1');

END; In article <91rfj7$u2n$1_at_nnrp1.deja.com>,   ssharma24_at_my-deja.com wrote:
> Developer 2000 forms disable button
> situation:
> There is a “buttonA” that has two possible labels say “This”
 and “That”
> The “when button pressed trigger” on the “buttonA” changes the labels
> on it as well as switch the enable, displayed, navigable properties of
> two items say blocka.itema and blocka.itemb.
> If the cursor is inside the itema or itemb and the user press the
> buttona then the user gets errors…like can not change the property
> enabled, displayed of the current item…while the cursor is inside it…
>
> So, what I want to do is put an if statement somewhere saying disable
> buttona if the cursor is inside either of the above mentioned items..
> i.e.
> if (:system.current_item = :blocka.itema) (:system.current_item
> = :blocka.itemb) then
> set_item_property ('CONTROL.buttona', ENABLED, PROPERTY_FALSE);
> ELSE
> set_item_property ('CONTROL. buttona ', ENABLED, PROPERTY_TRUE);
> END IF;
>
> Problem: I don’t know where I should put this statement…..in what
> trigger???on the block???or the items in question???
> Please help…
>
> I tried.. putting
> set_item_property ('CONTROL.buttona', ENABLED, PROPERTY_FALSE);
> in when-new-item-instance on both the items…that did the trick…but
 then
> I didn’t know where to put the statement to enable the button again..
>
> thanks….
>
> Sent via Deja.com
> http://www.deja.com/
>

Sent via Deja.com
http://www.deja.com/ Received on Sun Dec 24 2000 - 23:34:08 CET

Original text of this message