Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create control at runtime if using template?
#2
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;
Reply


Messages In This Thread
RE: How to create control at runtime if using template? - by MJS@mjs.us - 01-23-2024, 04:16 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)