Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIWEdit and HTML legend property
#1
I am using Intraweb 14.2.7 with Rad Studio Tokyo 10.2.3 (C++ Builder)
I would like to know how I can add a legend to a TIWEdit
I tried the solution below, but it does not work. The legend is not displayed

CSS definition
legend
{
  display: block;
  padding-left: 10px;
  border: none;

 background: none;
}

Then in my application
UnicodeString LegendText="username";
TIWEdit1->ExtraTagParams->Add("legend=" + LegendText);
Reply
#2
Legend is a tag itself, not an attribute of the input tag. Legend most of the times is also part of a fieldset tag.

You can tell IWRegion to render itself as a Legend tag using OnHTMLTag event of the IWRegion:

procedure TIWForm1.IWRegion1HTMLTag(ASender: TObject; ATag: TIWHTMLTag);
begin
ATag.Tag := 'legend';
end;

The code in C++ is analogous.
Reply
#3
I tried that solution but nothing is showing. Not drawing.
I know that the legend must be included into a fieldset using an HTML code like below:

<fieldset>
<legend>My Legend</legend>
<input type="TEXT" id="TIWEDIT1">
</fieldset>

But in this case the TIWEDIT is aldready created at design time.
Am I missing something ?
Reply
#4
Hi, try this:
Code:
<fieldset>
<legend>My Legend</legend>
{%TIWEDIT1%}
</fieldset>
I use in templates with bootstrap:
Code:
<div class="row">
  <div class="col-md-6 col-xs-12">
    <div class="form-group">
      <label for="inputEMAIL">E-Mail</label>
      {%IWDBEdit_EMail%}
    </div>
  </div>
</div>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)