Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create control at runtime if using template?
#3
(01-23-2024, 04:16 PM)MJS@mjs.us Wrote: I do something similar and found that the template must still contain a tag for the control and the control also be properly named:


Template snippet:
Code:
<div class="row"><div class="col-sm-12 text-center p-1">{%btnAdmin%}</div></div>


Creation:
Code:
TIWButton *b = new TIWButton(this);
b->Parent = this;
b->Name = "btnAdmin";
b->Caption = "Admin";
b->Css = "btn btn-secondary form-control";
b->HotKey = 'A';
b->StyleRenderOptions->RenderFlags = TRenderFlags() << rfRenderVisibility;

I see, thanks, I was hoping if its possible to not include in the template, but it seems that its impossible.
Reply


Messages In This Thread
RE: How to create control at runtime if using template? - by RenSword - 01-24-2024, 12:41 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)