2

I'm trying to implement a resizable MATLAB UI. But I'm encountering a lot of problems. In fact, the use of the normalized command is compulsory in order to have a window that automatically resize its content. However the 'normalization' of the uicontrol items it is not always the same. For instance the popupmenu is different from the text and edit. Moreover the FontSize has another behavior with respect to the previous ones.

Is there a simple tutorial out there in which all this stuff is explained? I didn't find any.

Nicholas
  • 1,915
  • 31
  • 55

1 Answers1

2

If you're doing this, I would seriously recommend using Ben Tordoff's GUI Layout Toolbox, available from the MATLAB Central File Exchange. It gives you GUI resizing almost for free, and much else besides, such as movable panels and well-implemented tab controls. It comes with good documentation, including some simple tutorials and a decent worked-through example.

Ben is from MathWorks consulting group, and the toolbox is used widely by MathWorks when delivering consulting projects. Although it's not a 'supported' MathWorks product, it's very reliable, and it's freely available for you to include in your own projects.

Without this, it's a huge pain to implement resizing on a GUI of any complexity - to do it properly you can't just rely on the 'normalized' property, you need to implement the ResizeFcn callback on everything, and pretty much re-lay everything out each time there's a resize.

Sam Roberts
  • 23,951
  • 1
  • 40
  • 64