1. Center Text in EditText

Hello All,

What's the best way to center text in an EditText?

Don Cole

new topic     » topic index » view message » categorize

2. Re: Center Text in EditText

dcole said...

Hello All,

What's the best way to center text in an EditText?

Don Cole

Create the control using the ES_CENTER flag.

create(EditText, "Sample Text", TheWin,  x, t, w, h, ES_CENTER) 
new topic     » goto parent     » topic index » view message » categorize

3. Re: Center Text in EditText

Thanks Derek,

I was thinking of padding the text right and left. But that seemed like a lot of trouble. I thought there might be an easier way.

Don Cole

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu