Re: How to make the push button dynamically change after query data?

From: Valery A. Sorokin <vsorokin_at_dd.ru>
Date: Wed, 17 Feb 1999 18:00:25 +0300
Message-ID: <36CAD989.6CF5D45F_at_dd.ru>


Yes, Vitaliy.

But, as you can see in previous messages, the subject of the question is MULTILINE block (as far as I understood):

  >I have the push button and it's enabled to use icon. After querying the

  >data, each push button
         ^^^^^^^^^^^^^^^^

  >should be able to point to the correct icon filename (using the   >set_item_property function).

If you use SET_ITEM_PROPERTY in multiline block then all the buttons of the block will have the same icon.

In case of using Set_Item_Instance_Property you can use different visual attributes of the items in the each record in multiline block. But you cannot use different icons :(

Vitaliy Mogilevskiy wrote:
>
> Yes there is but not in "Set_Item_Instance_Property" IT'S
> SET_ITEM_PROPERTY!:
>
> /*
>
> ** Built-in: SET_ITEM_PROPERTY
> ** Example: Change the icon of an iconic button dynamically
> ** at runtime by changing its icon_name. The user
> ** clicks on this button to go into enter query
> ** mode, then clicks on it again (after the icon
> ** changed) to execute the query. After the query
> ** is executed the user sees the original icon
> ** again.
> ** Trigger: When-Button-Pressed
> */
> DECLARE
> it_id Item;
> BEGIN
> it_id := Find_Item('CONTROL.QUERY_BUTTON');
> IF :System.Mode = 'ENTER-QUERY' THEN
> /*
> ** Change the icon back to the enter query icon, and
> ** execute the query.
> */
> Set_Item_Property(it_id,ICON_NAME,'entquery');
> Execute_Query;
> ELSE
> /*
> ** Change the icon to the execute query icon and get
> ** into enter query mode.
> */
> Set_Item_Property(it_id,ICON_NAME,'exequery');
> Enter_Query;
> END IF;
> END;

-- 
Valery A. Sorokin
ProSoft, Russia, Moscow, Information Systems Division
Phone: +7 (095) 234 0636 (6 lines) FAX: +7 (095) 234 0640
E-mail: vsorokin_at_dd.ru OR vsorokin_at_prosoft.ru
http://www.dd.ru
Received on Wed Feb 17 1999 - 16:00:25 CET

Original text of this message