Keep component size fixed question


#1

On the class tab of the jucer, in the fixed size field you get 2 options, keep component size fixed and resize component to fit workspace. I couldn’t understand what these do, so saved a copy of the cpp and h files, changed the option and diffed the files. There’s no substantive difference in the source, not surprising because there’s no difference in behaviour. So what gives?

I ask because I don’t want to get back into the cargo cult programming thing that’s practically compulsory with MFC. Ideally I’d like to just RTFM, understand what I need to do and do it rather than futzing about looking for explanations of how windowing is implemented. Still, it’s good at the price…

The question of the moment is how do I get a component to expand or contract to fill it’s containing component window or what have you. What would be so useful is a document that explains the overall architecture, so I don’t have to keep asking inane questions.


#2

That option just determines whether the jucer’s editor resizes the component when you resize the jucer window, or whether it leaves the size fixed. It has no effect on the code that’s generated, it’s just to let you avoid accidentally resizing a component when you’re editing it. I admit that’s not obvious, but as I’m in the middle of writing the jucer’s replacement, there’s not much point in me spending time documenting the old version now.

You just make it whatever size you want it in its parent’s resized() method.


#3

[quote]as I’m in the middle of writing the jucer’s replacement, there’s not much point in me spending time documenting the old version now[/quote] - fair enough.

I’ve just been getting on with things and ignoring the lay out - much quicker than MFC :smiley:

Off to look at resized now.