Re: how to disable user input to a text item?

From: Gudrun Janssen <janssen_at_itu.fzk.de>
Date: Mon, 15 Mar 1999 11:14:27 +0100
Message-ID: <36ECDD83.1A5D1E09_at_itu.fzk.de>


Hello Brandon,

I'm not sure what you need in your specific case, but how about writing this two little forms to test something:


Size window1: 640 x 480

Attach two Canvases to window1:
  canvas1: canvas type: content

           size: 640 x 480
  canvas2: canvas type: stacked

           size: 100 x 100

Create new block manually, call it block1

Add 3 items to block1:
  item1: pushbutton

         visible on canvas1
         x: 120
         y: 20
         label: show
  item2: pushbutton
         visible on canvas1
         x: 120
         y: 40
         label: hide
  item3: displayitem
         visible on canvas2
         initial value: test

Add Triggers to items:
  item1: when-button-pressed

         show_view('canvas2');
  item2: when-button-pressed

         hide_view('canvas2');

Now run the form.

Changing the bevel-property of canvas2 to 'none' makes the window looking like having only one canvas.


Write another form:

besides the default window window1 create another window, window2.

create two content canvases, canvas1 and canvas2.

in the properties of window1 make canvas1 the primary canvas. in the properties of window2 make canvas2 the primary canvas. in the properties of canvas1 make window1 window. in the properties of canvas2 make window2 window.

Create new block manually, call it block1

Add 3 items to block1:
  item1: pushbutton

         visible on canvas1
         label: show
  item2: pushbutton
         visible on canvas1
         label: hide
  item3: displayitem
         visible on canvas2
         initial value: test

Add Triggers to items:
  item1: when-button-pressed

         show_window('window2');
  item2: when-button-pressed

         hide_window('window2');

Run this form.

If you don't see window2 look behind window1!


maybe this small programs help you to change your form as necessary.


you can disable user input from text-items like this: set_item_property('blockname.itemname', enabled, property_false); enable it again with:
set_item_property('blockname.itemname', enabled, property_true);


Good luck!
Gudrun

Brandon Lee wrote:

> hi anyone,
> i have some text item not bound to database which serve as display
> purposes. The problem is if i set them all to display items, the
> canvas/window will not load. How do i disable user input while still able
> to show the window? I am using forms 5.0 dev2000
Received on Mon Mar 15 1999 - 11:14:27 CET

Original text of this message