[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: IUPMatrix (Re: GTK Binding)
- From: "Carlos Augusto Teixeira Mendes" <cmendes@...>
- Date: Fri, 27 Feb 2004 19:59:41 -0300
Well, it's been some time since I last used IUP (3 years at least...), but
IupMatrix used to have a FIELD_CB which enabled the user to set the widget
used
to edit each cell.
Feeling a bit nostalgic, I checked the IUP docs and found that this feature
didn't made
to the manual, but is still buried deep inside the matrix implementation.
Back then, few people used this feature and it wasn't very well tested, so I
guess
that's why it has been removed from the set of official features of the
matrix
control (Mark, any comments?), but I remeber to have done some interesting
magics
with it.
It shouldn't be very hard to put a checkbox to work (no guarantees given...
you might even neeed to dig into the matrix code for it to work).
Carlos Augusto.
> -----Original Message-----
> From: lua-bounces@bazar2.conectiva.com.br
> [mailto:lua-bounces@bazar2.conectiva.com.br]On Behalf Of Rafael Sabbagh
> Armony
> Sent: Thursday, February 26, 2004 3:19 PM
> To: Lua list
> Subject: Re: IUPMatrix (Re: GTK Binding)
>
>
> > > As you say, IUPMatrix does lack flexibility - the stopper for
> me is that
> the
> > > element values must solely be text fields - no graphics,
> check boxes or
> drop
> > > down lists. This would mean another navigation for my users
> (i.e. look
> at
> > > list, then double click to pop up an editable for of one of the rows).
>
> You really can't have graphics or check boxes as element values
> in IUPMatrix
> (althought you can change cell colors) , but dropdown lists are
> very easy to
> implement: all you have to do is use the DROP_CB and set all
> dropdown values
> with IupSetAttribute(drop, index, value) for the correct line and column.
>
> E.g.:
>
> iumatrix1 = iupmatrix {
> ...
> }
>
> iupmatrix1.drop = mydrop
>
> function mydrop(self, drop, lin, col)
> if (lin ==1 and col == 1) then
> IupSetAttribute (drop, 1, "First Option")
> IupSetAttribute (drop, 2, "Second Option")
> IupSetAttribute (drop, 3, "Third Option")
> return IUP_DEFAULT
> else
> return IUP_IGNORE
> end
> end
>
> You have to double-click the cell to see the dropdown.
>
>
> > > I also found it difficult to show a change of sort direction in the
> title
> > > bars (i.e. sort one way when title is clicked - changing the title to
> > > indicate current sort order).
>
> Well, you can always change the title, but you can't use
> graphics. You have
> to find a way to indicate the sort order with simple text (maybe
> \/ and /\).
> For implementing the sort itselft, there are two simple methods:
>
> 1) You switch the values in the matrix.
> 2) You use the iupmatrix in callback mode, change your data structure and
> then use REDRAW.
>
>
>
> - Rafael
>
> ----- Original Message -----
> From: "Ivan Kolev" <ikolev@abac.com>
> To: "Lua list" <lua@bazar2.conectiva.com.br>
> Sent: Thursday, February 26, 2004 2:45 PM
> Subject: IUPMatrix (Re: GTK Binding)
>
>
> > You *can* have drop-down lists, which is quite useful. And you can
> > simulate checkboxes with them, by simply putting ON/OFF or TRUE/FALSE
> > inside them. Though it's ugly, of course :)
> >
> > Ivan
> >
> > Martin Kendall wrote:
> >
> > > As you say, IUPMatrix does lack flexibility - the stopper for
> me is that
> the
> > > element values must solely be text fields - no graphics,
> check boxes or
> drop
> > > down lists. This would mean another navigation for my users
> (i.e. look
> at
> > > list, then double click to pop up an editable for of one of the rows).
> > >
> > > I also found it difficult to show a change of sort direction in the
> title
> > > bars (i.e. sort one way when title is clicked - changing the title to
> > > indicate current sort order).
> > >
> > > Thanks for pointing it out though,
> > >
> > > Martin
> > > "Vadim Macagon" <vadim_mcagon@hotmail.com> wrote in message
> > > BAY2-DAV22NEbre8nYU0000721c@hotmail.com">news:BAY2-DAV22NEbre8nYU0000721c@hotmail.com...
> > >
> > >>"Martin Kendall" wrote
> > >>
> > >>>I love the idea of using IUP - It fits so well with the lua
> philosophy,
> > >>>however it doesn't seem to have a grid control (Multiple rows like a
> > >
> > > list,
> > >
> > >>b
> > >>
> > >>>ut with multiple columns).
> > >>>
> > >>>I think that is the only stopper for me.
> > >>
> > >>The IupMatrix looks like a grid control to me :), unless it's not
> flexible
> > >>enough for you.
> > >>
> > >>
> > >>Regards,
> > >>
> > >>Vadim.
> > >>
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.593 / Virus Database: 376 - Release Date: 2/20/2004
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.596 / Virus Database: 379 - Release Date: 2/26/2004