Rency
Rency

Reputation: 404

how to create a curved border for a label in extjs?

I am trying to create a curved border(border line with curved corner) for a label in extjs. this is for highlighting some important text?

 xtype: label,
 text: 'my text',
 margin: '0 0 0 5'

these are my current properties of that label.

Upvotes: 1

Views: 3658

Answers (1)

Izhaki
Izhaki

Reputation: 23586

The best way of doing it is by using css.

The css file:

.round-corners {
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    -o-border-radius: 3px;
    -ms-border-radius: 3px;
    -khtml-border-radius: 3px;
    border-radius: 3px;
}

And then:

xtype: label,
text: 'my text',
margin: '0 0 0 5',
cls: 'round-corners',

Upvotes: 2

Related Questions