Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Trusted Contributor
AllSystemGo
Posts: 140
Registered: ‎11-23-2010
My Device: Torch 9800
My Carrier: Rogers
Accepted Solution

Textfield with an icon in

Hello,

 

   I would like to know if it would be possible to have a textfield with an icon on the left in that textfield. Someone suggested using a StackLayout and overlay the icon on the textfield but I can't wrap my head on how to accomplish that. Beside overlaying the icon isn't going to hide the text under?

 

Thank you

Please use plain text.
Developer
bcs925
Posts: 262
Registered: ‎07-13-2012
My Device: PlayBook, DA B, DA C, LE Z10 #102, Q10, Z30
My Carrier: T-Mobile

Re: Textfield with an icon in

If you have Stack Layout with the properties set to LefttoRight you could have Label{} ImageView{} Label{} and the icon should appear inline with text.  Or if you have Absolute Layout you could precisely control where the icon appears on the screen and wrap text around it.

---
Check out my BB10 Cascades Coding site: BBcascades.com & Cascades Blog: bbcascadescode.tumblr.com

My Built for BlackBerry app: The Dive Plan
Please use plain text.
Trusted Contributor
AllSystemGo
Posts: 140
Registered: ‎11-23-2010
My Device: Torch 9800
My Carrier: Rogers

Re: Textfield with an icon in

Yep it works but looks ugly, since the icon overlapthe text. Guess I'll leave it alone. Looks good without anyways

Please use plain text.