1. How do I center text?
- Posted by doncole2009 Jun 24, 2009
- 985 views
Hello All,
How does one center text in a EditText or ComboBox? Or does it have to be a Window or Bitmap to do that?
Don Cole
2. Re: How do I center text?
- Posted by DerekParnell (admin) Jun 24, 2009
- 948 views
constant ET = create(EditText, "", MainWin, 20, 20, 300, 40, ES_CENTER)
However, is this a control in which the user can enter text or is it just a display-control?
If you just need to display centered text, you can use the CText control. eg.
constant CT = create(CText, "", MainWin, 20, 20, 300, 40, WS_BORDER) setBackground(CT, 0, BrightWhite) setTextColor(CT, BrightBlue) setText(CT, "ABC")
3. Re: How do I center text?
- Posted by doncole2009 Jun 25, 2009
- 885 views
- Last edited Jun 26, 2009
DerekParnell said...
constant ET = create(EditText, "", MainWin, 20, 20, 300, 40, ES_CENTER)
However, is this a control in which the user can enter text or is it just a display-control?
If you just need to display centered text, you can use the CText control. eg.
constant CT = create(CText, "", MainWin, 20, 20, 300, 40, WS_BORDER) setBackground(CT, 0, BrightWhite) setTextColor(CT, BrightBlue) setText(CT, "ABC")
Thank you Derek.
Don Cole