Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread CSS styles
Fri, Apr 20 2012 7:51 AMPermanent Link

Ronald

Hi,

I tried to use TLabel with inline styles. That does not work as expected:

TLabel is always AutoSized in the height
TLabel always creates a rectangular background, even if you specify rounded
corners.

Can't you create a component that executes the CSS style, but keeps the size
that I specify? Would be great is the rest of the properties of TLabel are
available too.

Greetings,
Ronald



Attachments: example.jpg
Fri, Apr 20 2012 11:12 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ronald,

<< Can't you create a component that executes the CSS style, but keeps the
size that I specify? Would be great is the rest of the properties of TLabel
are available too. >>

You're fighting against the framework's control of the DOM element styling
with custom styles, and trying to do things in the "old fashioned" way.  In
general, if you want to use customized DOM elements, you should define your
own TControl descendant and implement it accordingly.  If you look at the
TLabel source code in the WebCtrls unit, you will see how such a control is
implemented.  You can set all of a DOM element's styles programmatically
based upon properties that you defined for your custom control.  It's much
neater and cleaner than using inline styles directly as HTML tags.

--
Tim Young
Elevate Software
www.elevatesoft.com
Sat, Apr 21 2012 6:58 AMPermanent Link

Ronald

You have a point there. I tried the quick and dirty road. I will study your
sourcefiles, now.

"Tim Young [Elevate Software]"  schreef in bericht
news:566758E5-FB78-4E10-B7C4-14A8FD0D7C3F@news.elevatesoft.com...

Ronald,

<< Can't you create a component that executes the CSS style, but keeps the
size that I specify? Would be great is the rest of the properties of TLabel
are available too. >>

You're fighting against the framework's control of the DOM element styling
with custom styles, and trying to do things in the "old fashioned" way.  In
general, if you want to use customized DOM elements, you should define your
own TControl descendant and implement it accordingly.  If you look at the
TLabel source code in the WebCtrls unit, you will see how such a control is
implemented.  You can set all of a DOM element's styles programmatically
based upon properties that you defined for your custom control.  It's much
neater and cleaner than using inline styles directly as HTML tags.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image