|
<< Click to Display Table of Contents >> Navigation: Forum > Span in IW Bootstrap |
09-23-2018, 11:42 PM:
Does anyone know how to get a span in IW Bootstrap?
I added a TIWBSRegion and thought I could set the TagType to span, but it only gave me the options for div, headers and p.
So I tried TIWBSText -- and it started out well -- I could set the Tag to span. But then I found that this component cannot act as a container.
There is no TIWBSSpan component.
What is the solution? How do I put a container component on my page that has the tag of span?
09-26-2018, 07:46 AM:
Hi LozenSzendre,
The TIWBSRegion only gives an option for div, h1..h6 and p while TIWBSCustomRegion has full options in the form of a string TagName... I don't see the reason for this enumeration either. You can of course create your own component.
Other simple workaround for this moment is using OnHTMLTag event
Code:
procedure TFrame2.IWFrameRegionHTMLTag(ASender: TObject; ATag: TIWHTMLTag);
begin
ATag.Tag := 'span';
end;
09-26-2018, 11:34 AM:
(09-26-2018, 07:46 AM)jeroen.rottink Wrote: [ -> ]Hi LozenSzendre,
The TIWBSRegion only gives an option for div, h1..h6 and p while TIWBSCustomRegion has full options in the form of a string TagName... I don't see the reason for this enumeration either. You can of course create your own component.
Other simple workaround for this moment is using OnHTMLTag event
Code:
procedure TFrame2.IWFrameRegionHTMLTag(ASender: TObject; ATag: TIWHTMLTag);
begin
ATag.Tag := 'span';
end;
Thanks for your answer!
09-26-2018, 06:09 PM:
(09-26-2018, 11:34 AM)LorenSzendre Wrote: [ -> ] (09-26-2018, 07:46 AM)jeroen.rottink Wrote: [ -> ]Hi LozenSzendre,
The TIWBSRegion only gives an option for div, h1..h6 and p while TIWBSCustomRegion has full options in the form of a string TagName... I don't see the reason for this enumeration either. You can of course create your own component.
Other simple workaround for this moment is using OnHTMLTag event
Code:
procedure TFrame2.IWFrameRegionHTMLTag(ASender: TObject; ATag: TIWHTMLTag);
begin
ATag.Tag := 'span';
end;
Thanks for your answer!TIWBSRegion on my machine now has bsttSpan in the Object Inspector)))
I guess I'd better push the change to the repository so I don't mess up my project when I upgrade....