Re: XForms: Multi-Line input.

From: Kay Bowen (kbowen@tecmasters.com)
Date: Tue Mar 19 2002 - 07:31:40 EST


# To subscribers of the xforms list from Kay Bowen <kbowen@tecmasters.com> :

I was able to deactivate a couple of input boxes on my form. But with
that, the user wasn't able to use the scrollbars to view the text.
Mainly I was just wanting to keep the user from typing in the boxes and
changing the text.

I managed to do this by adding the following lines to my initialization
of the input objects.

fl_set_input_filter(fd_form->input1, noinput_filter);
fl_set_input_filter(fd_form->input2, noinput_filter);

Then I added the function -

int noinput_filter(FL_OBJECT* ob, const char* old,
                        const char* cur, int c)
{
        return FL_INVALID;
}

The function returns an invalid value each time the user tries to type
within the input object, therefore disabling the ability to alter the
text. However, they are still able to highlight text for copying, and
use the scrollbars for viewing.

It worked for me. Hope it helps you.

K

Serge B Bromow wrote:

> Me Again,
>
> v89, SCO OST505 & Linux RH7.1
>
> I have an app with a Multi-Line input field. I can't seem to
> deactivate the thing. I have tried the obvious "fl_deactivate_object"
> but that seems to have no affect.
>
> Is this a bug, a feature or am I missing something?
>
> Help wanted!
>
>
> Serge
>
>

-- 
Kay Bowen

Tec-Masters, Inc. Advanced Studies and Research Center

_________________________________________________ To unsubscribe, send the message "unsubscribe" to xforms-request@bob.usuhs.mil or see http://bob.usuhs.mil/mailserv/xforms.html XForms Home Page: http://world.std.com/~xforms List Archive: http://bob.usuhs.mil/mailserv/list-archives/



This archive was generated by hypermail 2b29 : Wed May 01 2002 - 13:54:17 EDT