[Solved] How to open sizeboxes of Shape Control at runtime? lazarus / 39-Graphics ---------------------------------------------------------------------- loaded · 2019-10-02 09:28 Hi All Sizeboxes open and running at design time,but it disappears at runtime. Can we view them at runtime ? http://delphidabbler.com/tips/93 There is a study on the subject, but it works on Wincontroller. ---------------------------------------------------------------------- wp · 2019-10-02 10:17 The JvRunTimeDesign package of JVCL does show size boxes around any controls (installable via OPM, see JvDesigner example). Maybe overkill for your purpose. Some thoughts how I would do it for a general solution (untested): - Define a class TSizeBox for a single size box. Has property "Position = (pEast, pSouthEast, pSouth, pSouthWest, pWest, ...)" and "Control". Is drawn at the corresponding position of the Control. Has mouse event handlers for dragging the size boxes in the direction corresponding to the Position parameter. The new position of the size box is applied to the corresponding size parameter of the control. - Define a class TSizeBoxes for all size boxes of a control. Has property "Control" - The "TSizePanel" gets a method "ShowSizeBoxes" which creates the TSizeBoxes and displays them. "HideSizeBoxes" removes them again. ---------------------------------------------------------------------- loaded · 2019-10-02 10:47 wp, We have similar ideas. I thought maybe there was a shorter path. Thank you very much for your answer. ---------------------------------------------------------------------- avra · 2019-10-03 21:57 Quote from: loaded on October 02, 2019, 12:47:48 pmI thought maybe there was a shorter path.There is, as wp has already mentioned: https://wiki.freepascal.org/JVCL_Components#JvRuntimeDesign ---------------------------------------------------------------------- loaded · 2019-10-04 05:47 avra thank you for your answer. The solution on the https://www.thoughtco.com/how-to-move-and-resize- controls-at-run-time-4092542 seemed more convenient to me as it was ease of use. ---------------------------------------------------------------------- wp · 2019-10-04 10:02 Quote from: loaded on October 04, 2019, 07:47:58 amThe solution on the https://www.thoughtco.com/how-to-move-and-resize-controls-at-run- time-4092542 seemed more convenient to me as it was ease of use. But they don't explain how to draw the size boxes which was the topic of your question. ---------------------------------------------------------------------- Thaddy · 2019-10-04 10:39 I wrote something for KOL about 20 years ago http://members.chello.nl/t.koning8/kolfrmdesign.zip Maybe of help, because it shows how to make a simple designer and a size control. Needs some work to use it with lazarus, but the algorithms are self explaining. ---------------------------------------------------------------------- loaded · 2019-10-04 11:15 Thaddy and wp thank you very much for your answers. Wp was not exactly what I wanted, but the method was available, so I did a work on him. Thaddy 20 years is a long time, thank you very much for your case study. Health in your hands. I finally did what I wanted (might be a little amateur) Let's put it here maybe someday it might help someone ---------------------------------------------------------------------- Thaddy · 2019-10-04 11:28 20 years was rounding mode: actually 17 years.. Glad you have a working solution.