Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIWEdit and HTML legend property
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
  display: block;
  padding-left: 10px;
  border: none;

 background: none;

Then in my application
UnicodeString LegendText="username";
TIWEdit1->ExtraTagParams->Add("legend=" + LegendText);
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);
ATag.Tag := 'legend';

The code in C++ is analogous.
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:

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

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

Forum Jump:

Users browsing this thread: 1 Guest(s)