Forums FXRuby

 
Generic-user-small Thomas Wiecz... 5 posts

I finished chapter 5.4 and I run into a strange problem which I cannot fathom out on my own.
My code looks more or less like the sample code for 5.4 and I run into a problem with it(I also replaced my code with the online version, but it is the same).
My first album, created in PictureBook#initialize() is in the AlbumListView. I import some photos and they are arranged according to the window width. I add a new album, click on it and import some photos there. But the picture are not arranged, there’s just one column with the pictures. If I click on my first album and then again on the new one, AlbumView.layout probably kicks in and the pictures are arranged as they should.
I have the same problem when I am in an album and maximize it. The photos are not rearranged until I click on a different album and then back to the old one.

Did someone experience the same behaviour?

Regards, Thomas

 
Lovablelyle_small Lyle Johnson 21 posts

The next update of the beta book should include the chapter on “Managing Layouts”, which has a discussion of FOX’s deferred layout mechanism. I think what your code might need is an additional call to the switcher’s recalc() method after you import the additional photos or maximize the window.

 
Generic-user-small Thomas Wiecz... 5 posts

Great, I just read about recalc() on the FXRuby hompage. Great site! I’ll try it.

3 posts, 2 voices