Is there an expert that can resize a container (panel, scrollbox, form, frame, etc) to be just large enough so it fits all it components?

Is there an expert that can resize a container (panel, scrollbox, form, frame, etc) to be just large enough so it fits all it components?

So: grow when the container is too small, shrink when it's too large.

Edit: VCL DesignTime taking into account non-visual components, maybe in the future FMX as well.

Comments

  1. Do you mean at design time, or only at run time?

    ReplyDelete
  2. David Heffernan Can you stop commenting while I'm busy editing?

    ReplyDelete
  3. David Heffernan Yes, it takes about 10 sec. to read them. Time I can spend coding.

    ReplyDelete
  4. I don't think there is currently an IDE expert that does this.

    ReplyDelete
  5. Jeroen Wiert Pluimers Sounds interesting, though. Let us know when you have it ready? ;)

    ReplyDelete
  6. TPanel, TScrollBox, TForm and TFrame all have a property AutoSize under VCL. Does that not work as you describe? If not, what are you missing?

    ReplyDelete
  7. Uwe Raabe It probably does not because AutoSize modifies the position of the controls on it.

    ReplyDelete
  8. Stefan Glienke Not when you have a control at (0,0) or somewhere similar respecting the margins (Did I mention, that it respects margins and padding?). Anyway, Jeroen will know if he can work with it or not.

    ReplyDelete
  9. I guess this should do it basically (at least it should get you started) - just put it into a designtime package, add designide to the requires and install it: http://pastebin.com/vT0FnRPN

    ReplyDelete
  10. Thanks. I'll give those suggestions a try on Thursday.

    ReplyDelete
  11. Well Jeroen Wiert Pluimers , I'm an expert, and I do those sort of things (with a mouse at design time), but I think you are looking for an IDE installed expert - scroll boxes and the like should do that :/ - OK, I am gonna run like hell while I got the chance....

    ReplyDelete
  12. Joe C. Hecht Plus, I really thought Jeroen Wiert Pluimers was a pretty fair expert, too, and I am confident he has a working mouse.

    ReplyDelete
  13. Bill Meyer Joe C. Hecht  the problem is that I had RSI in the early 1990s so I need to avoid the mouse whenever possible. Hence the request for expert.

    ReplyDelete
  14. Uwe Raabe the AutoSize property did it for me. Thanks.

    ReplyDelete
  15. Stefan Glienke can you explain to me how your ResizeControlEditor work when i install it as a component?
    i work with D10.2.3

    ReplyDelete

Post a Comment