<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body><div style="font-family:Helvetica,Arial;font-size:13px; ; ">Maybe if your could send us a screenshot or your project (as possible)</div><div style="font-family:Helvetica,Arial;font-size:13px; ; ">to be able to visually understand what you want to build</div> <br> <div class="gmail_signature"><div style="font-family:helvetica,arial;font-size:13px"><br></div><div style="font-family:helvetica,arial;font-size:13px"><br></div><div style="font-family:helvetica,arial;font-size:13px">Olivier Cruilles</div><div style="font-family:helvetica,arial;font-size:13px">Email: olivier.cruilles@yahoo.fr</div></div> <br><p class="airmail_on">Le 26 mars 2020 à 14:44:47, ub2@gmx.ch (<a href="mailto:ub2@gmx.ch">ub2@gmx.ch</a>) a écrit:</p> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>Dear Olivier and Lee
<br>
<br>
<br>Thanks a lot for your ideas.
<br>
<br>Right now your code is slightly above my head,
<br>but I will dig into and be back probably in a few days.
<br>
<br>Most likely it needs deciding whether I want to manage complexity
<br>a) at the very beginning when listing, or
<br>b) later on when accessing/calculating created lists
<br>
<br>The project already deals with 9 lists, not too much more to come.
<br>On the other side, calculations to be adapted upon request....
<br>
<br>So for now, work for a) seems to smell less...
<br>
<br>
<br>Sorry for this unspecific answer.
<br>But your inputs already helped a lot, and will even do more.
<br>
<br>
<br>Again, thanks for your help,
<br>and greetings to all Gambin@s.
<br>
<br>ub2
<br>
<br>Am 26.03.20 um 12:00 schrieb ub2@gmx.ch:
<br>> Dear Gambas Cracks
<br>>
<br>> 2nd try, 1st see below
<br>> (Was user@lists.gambas-basic.org partially down yesterday ?)
<br>>
<br>> Best regards
<br>> ub2
<br>>
<br>>
<br>> -------- Weitergeleitete Nachricht --------
<br>> Betreff: How to duplicate Controls with all its preferences at runtime
<br>> Datum: Wed, 25 Mar 2020 10:21:48 +0100
<br>> Von: ub2@gmx.ch <ub2@gmx.ch>
<br>> An: user@lists.gambas-basic.org
<br>> Kopie (CC): ub2@gmx.ch
<br>>
<br>> Dear Gambas Cracks
<br>>
<br>>
<br>> I'm fiddling since 2 days, code explodes, and I'm sure there must be a
<br>> better way ...
<br>>
<br>>
<br>> I'd like to duplicate at runtime various Controls (different types!)
<br>> with all it's preferences (Formatting, Pictures, etc).
<br>>
<br>> The situation:
<br>> In a scrollview I have "a well prepared Master-Controls-line" like
<br>> TglBtn_...._0 | Txta_....._0  | Txtlbl_..._0 | Pixcb_..._0 | ...
<br>>
<br>> In order to get new "Record-Lines" I'd like to duplicate all those
<br>> Master-Controls them with the clumsy code partially shown in
<br>>  Attachement 200325...
<br>> and access the Controls later with:
<br>>  $Ctrl$ = Me.Txtlbl_....._1
<br>>  $Ctrl$ = Me.Txtlbl_....._2
<br>>          ...
<br>>
<br>> I'd like to avoid SubForms like:
<br>>      $NewUFrm$ = New UFrmXYZ($RecNr$, ..., ..., $Scrvw$)
<br>> because access to those new Controls becomes more complicated:
<br>>  $Txtlbl_...._0$ = UFrmXYZ(Me.Scrvw.Children[0]).Children[2]
<br>>
<br>>
<br>> My Question:
<br>> Is there a command like:
<br>>     $Ctrl_New$ = NewWithPrefs Control($CtrlParent$)
<br>>     $Ctrl_New$ = Duplicate Control($CtrlParent$)
<br>>     ore similar
<br>>
<br>> Any ideas, links, keywords, etc would be highly appreciated.
<br>>
<br>>
<br>> Thanks for Gambas and this very helpful community.
<br>> Take care and stay healthy
<br>>
<br>> ub2
<br>>
<br>>
<br>>
<br></div></div></span></blockquote></body></html>