Enable designtime functionality at runtime? lazarus / 31-LCL ---------------------------------------------------------------------- heeb · 2021-08-03 17:48 Hi, I'm making an IDE-like application, a GUI builder (it's for external use, not itself related to Lazarus or FreePascal). So, I need to be able to add and drag and resize controls at runtime, and also display a grid (or Lazarus-/Delphi-like dots at grid points) at runtime. Since Lazarus itself is a Lazarus application, I guess achieving this shouldn't be too complicated. What would be the easiest, most straightforward way of doing this? Many thanks! ---------------------------------------------------------------------- avra · 2021-08-03 18:33 Tako a look at JVCL and pl_cindy which can be downloaded through OPM. https://forum.lazarus.freepascal.org/index.php/topic,46586.msg332443.h tml ---------------------------------------------------------------------- heeb · 2021-08-03 19:01 Quote from: avra on August 03, 2021, 08:33:46 pmTako a look at JVCL and pl_cindy which can be downloaded through OPM. https://forum.lazarus.freepascal.org/index.php/topic,46586.msg332443.h tml Will do! Thank you very much ---------------------------------------------------------------------- heeb · 2021-08-03 20:40 Quote from: avra on August 03, 2021, 08:33:46 pmTako a look at JVCL and pl_cindy which can be downloaded through OPM. https://forum.lazarus.freepascal.org/index.php/topic,46586.msg332443.h tml This indeed looks to be exactly what I need Thank you so much! ---------------------------------------------------------------------- heeb · 2021-08-05 16:04 Quote from: avra on August 03, 2021, 08:33:46 pmTako a look at JVCL and pl_cindy which can be downloaded through OPM. https://forum.lazarus.freepascal.org/index.php/topic,46586.msg332443.h tml Hi Avra, I was wondering if you could help me with the following: I have successfully incorporated the Cindy component, and a TTIPropertyGrid as well. I'm having some trouble with their interoperability though: When the Cindy component is inactive, changes in the property grid are reflected in the component immediately. This is good. However, when the Cindy component is activated, and I change something in the property grid, the effect of its new value on the component is not shown immediately but only when I then click on it / refocus the component. I've attached a gif to show this. I'm assuming this is either some property in the Cindy component I need to set to allow live updates while active, or a method in the Cindy component I need to call whenever a value in the property grid has changed? Many thanks! ---------------------------------------------------------------------- avra · 2021-08-05 17:47 Quote from: heeb on August 05, 2021, 06:04:39 pmI have successfully incorporated the Cindy component, and a TTIPropertyGrid as well. I'm having some trouble with their interoperabilityI have not used such combination so I can not help directly. Maybe you can solve it by leaving cindy design mode when clicking on PropertyGrid? Or take a deeper look at how Cindy internally works and change it to your liking? I am not the author and my role was in making pl_cindy from CodeTyphon compatible with Lazarus. You can discuss the problem with original author at https://sourceforge.net/projects/tcycomponents/. As an alternative, you can try JVCL. EDIT: In CyResizerDemo I see that selection is programmatically moved in design mode with this piece of code: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TFrmCyResizer.SBResizerDownClick(Sender: TObject);begin  if RBMoveMode.Checked  then cyResizer1.MoveSelection(0, 10, CBIgnoreSnapToGrid.Checked)  else cyResizer1.ResizeSelection([reBottom], 0, 10, CBIgnoreSnapToGrid.Checked);end;Have you looked at demos at all? ---------------------------------------------------------------------- heeb · 2021-08-05 23:29 Quote from: avra on August 05, 2021, 07:47:37 pmI have not used such combination so I can not help directly. Maybe you can solve it by leaving cindy design mode when clicking on PropertyGrid? In the meantime I have indeed been experimenting with this approach, and it looks very promising. I just need to temporarily store some info before leaving design more, and restore that upon re-entering it. Quote from: avra on August 05, 2021, 07:47:37 pmI am not the author I understand, and I am already very, very grateful for the help you have offered. Quote from: avra on August 05, 2021, 07:47:37 pmHave you looked at demos at all? Yes, I have, and that has also clarified a good few things. Thank you again, I can now progress and create something useful!