On Sat, Feb 15, 2014 at 3:27 PM, Riku Lindblad <
riku.l...@gmail.com> wrote:
>> > Now I'm having an issue with GridColTitles. Is it possible to adjust its
>> > height value dynamically during while_waiting?
>> >
>> > In need the GridColTitles element to increase in size (height) based on
>> > the
>> > amount of data I add to it during the while_waiting event.
>>
>> I'm not quite sure when you need to actually change the size of the
>> grid widget. What is wrong with the default behaviour?
>
>
> I'm building a tool that has no user input in its basic state, it just
> displays data it fetches from the internet and a few databases updating the
> screen as necessary.
>
> In this program I have multiple grids on one page, each can contain anything
> from 0-30 rows (even more in extreme cases).
>
> This is why I'd want to adjust the space the grids take up on each page. I
> need to completely hide the table when there is nothing to display for that
> particular grid and also adjust the size based on the content so it's not
> using any more space than it needs to.
OK. I'm trying to think of a way I can make that work for you. You
can already hide particular widgets by setting the .hidden attribute
to True. But that doesn't help you with the bigger issue.
Resizing is a tricker problem. Especially since you could very easily
run out of space for your widgets doing this kind of dynamic layout.
It adds a huge level of complexity to the system. I'll give it some
thought.
How often are you doing the updates? If they are relatively
infrequent, you might find that you can achieve what you want by
dynamically creating a new Form completely every time you do the
search. I can see that that might not be ideal.
N.