Stephane,
Try an XmNenterCellCallback that looks something like this
----------%<---------------------------------------->%-----------
void
cellEnteredCB(Widget w, XtPointer clientData, XtPointer callData)
{
XbaeMatrixEnterCellCallbackStruct* cbs =
(XbaeMatrixEnterCellCallbackStruct*) callData;
// Decide if the cell should be editable ...
Boolean editable = cell_should_be_editable(cbs->row, cbs->column);
// Set the callback structs fields so that editing does not proceed
// and the text widget is not mapped if the cel is not editable.
cbs->doit = cbs->map = editable;
}
----------%<---------------------------------------->%-----------
Have Fun,
jostle.
Original Message:
-----------------
From: Danny Backx [EMAIL PROTECTED]
Date: Wed, 07 Nov 2001 21:07:49 +0100
To: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: R�f. : Re: [Lesstif] multiple text widgets in
Xbae
There's an XmNenterCellCallback in XbaeMatrix which allows you do perform
actions before entering a cell. Here's what the manual page says about it :
Specifies a list of callbacks to be called immediately before a cell
is to be edited. This callback list is called by the EditCell() action.
A pointer to an XbaeMatrixEnterCellCallbackStruct is passed to the
callbacks. The application can specify the editability of specific cells
using this callback list as well as specifying configuration options
for the XmText.
Sounds like what you need, doesn't it ?
Danny
[EMAIL PROTECTED] wrote:
>
> It's a bit hard to explain. I want to implement a table interface that displays a
>list of single records spread on multiple lines. It would behave both as an ordinary
> read only table and as a form. Here is an example of the "form table" I have in mind:
>
> General Journal
> _______________________________________
> Date Description Debit Credit
>
> 11-02 Some account A 15 | this is record 1
> Somme expense B 15 |
>
> 11-05 Some revenu C__ 10 | this is record 2
> Some account D_ 10 |
>
> 11-07 Some account E 5 | this is record 3
> Somme expense F 3 |
> Somme expense G 2 |
> _______________________________________
> Save Cancel
>
> The underline fields are the editable ones. Multiple editable fields would allow to
>have a stronger control of the edition by dynamically indentifying and limiting the
> editable fields, possibly navigating from one to another with single <tab>s, and
>give the possibility to record or discard the changes as needed. Maybe I could call
>it a
> "Quicken account" behavior.
>
> I probably can emulate this with smart drawing and color coding, by hacking the
><tab> key and settings some fields as read-only/writable as needed. But it would be
>more
> natural to implement it with multiple "true" editable fields.
>
> Anyway, Xbae seems flexible enough for me to find another way out if this is to
>weird to implement.
>
> Thank you for answering.
>
> ---
> St�phane Russell
> Conseiller en d�veloppement
> Service Acc�sD - Particuliers
> F�d�ration des caisses Desjardins du Qu�bec (FCDQ)
> t�l: 514 281-7000 x8155, 1 866 866-7000 x8155, fax: 514 843-4958
> mailto:[EMAIL PROTECTED]
>
> Danny Backx <[EMAIL PROTECTED]>@riker.skynet.be on 2001-11-06 17:48:25
>
> Envoy� par : [EMAIL PROTECTED]
>
> Pour : [EMAIL PROTECTED]
> cc : [EMAIL PROTECTED]
> Objet : Re: [Lesstif] multiple text widgets in Xbae
>
> The fact that XbaeMatrix only has one text widget is a design decision.
> It is very easy, but also very expensive, to make a matrix full of
> XmText(Field) widgets by using e.g. XmRowColumn as container.
>
> Could you explain why you would want more than one textfield at a time ?
>
> Danny
>
> [EMAIL PROTECTED] wrote:
> > I'm taking a look at the Xbae tool. It seems that it is only possible
> > to have one text widget working at a time. I'm thinking of making some
> > sord of dynamic table form
> > that would require the table to have more than one text widget (as much
> > as I need) activated at one moment. It would allow part of a table to behave
> > like an ordinary
> > form, and the rest to behave like a normal table.
>
> --
> Danny Backx ([EMAIL PROTECTED] [EMAIL PROTECTED])
> Home page : http://users.skynet.be/danny.backx
> Projects: LessTif (http://www.lesstif.org)
> Oleo (http://www.gnu.org/software/oleo/oleo.html)
--
Danny Backx ([EMAIL PROTECTED] [EMAIL PROTECTED])
Home page : http://users.skynet.be/danny.backx
Projects: LessTif (http://www.lesstif.org)
Oleo (http://www.gnu.org/software/oleo/oleo.html)
_______________________________________________
Lesstif mailing list
[EMAIL PROTECTED]
https://terror.hungry.com/mailman/listinfo/lesstif
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
_______________________________________________
Lesstif mailing list
[EMAIL PROTECTED]
https://terror.hungry.com/mailman/listinfo/lesstif