> >Can someone tell me if there is a way to add a grid-column-section
> >or grid-row-section to a grid via an API call rather than via the
> >:default-initargs approach to the defclass for the grid-widget?
>
> I often use something like this:
>
> (defmethod initialize-instance :after ((self <your-grid-class>)
> &rest initargs
> &key
> <more params>)
> (let* ((rows (<create-your-row-objects>))
> (row-target (row-section self <name-of-row-section>))
> (columns (<create-your-columns>))
> (column-target (column-section self <name-of-col-section>))
> (i 0))
> (dolist (a-row rows)
> (add-row row-target a-row (incf i)))
> (setf i 0)
> (dolist (a-column columns)
> (add-column column-target a-column (incf i)))
> ))
This snippet tells me how to add rows and columns to existing row-sections
and existing column-sections, which I already knew how to do.
I am seeking a way to add new row-sections to a grid at runtime.
It should be a function like cg:add-row-section, but there is no
such beast.
Let me take a step back and describe the situation I desire.
What I'm trying to do is add a Total row to some grid instantiations but
not to others. I would like the Total row to be in its own section
so that it is never scrolled out of view. Seems to me the only way
to do this is to add (or delete) a section at runtime, but there are
no API functions to do this. Anyone have a good idea for my situation?
In explaining all this, I just realized that one approach might be to
put the Total row-section in for all grid instantiations, but set its
size at runtime to be non-zero when I want to see it and zero when
I don't want to see it. Does this sound like it would work?
thanx,
+Rick
--
Richard "Carm" Chimera | office: 305 S. Craig Street, Suite 100
Wisdom Technologies Corporation| voice: 1.412.688.8781 x240
414 S. Craig Street, Suite 304 | fax: 1.412.268.6298
Pittsburgh, PA 15213 USA | <wisdomcorp.com, at carm> http://www.wisdomcorp.com
"Any and all statements, representations, etc. made above are mine and
do not necessarily represent those of my employer, my computer/internet
service provider, my mother, nor anyone else except as noted."
This message (c)Copyright 1997, Richard Chimera. All rights reserved. Really.