wxtextCtrl text placement

Andre F <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <CANdLyG3EA7JP52dAUq05PYXwhJy2E_a4hQOk7BOAR3q4Nv-pyw@mail.gmail.com>
I'm trying to figure out why the text doesn't stay vertically centered
inside the box when I increase the size of the text.  The box clearly has
enough room, but the text starts to go out of view instead of staying
vertically centered.  I've tried various things, but am unable to keep it
centered.

Can someone tell me what's wrong?

cstm5_e_textCtrl = new wxTextCtrl(panel2, wxID_ANY, wxT(""),
wxDefaultPosition, wxSize(box_w, box_ht), wxNO_BORDER | wxTE_CENTER);
p2rowThree->Add(cstm5_e_textCtrl, 0, wxEXPAND | wxALL, 10);


contents << cstm_wrd[cstm_cnt];
wxFont font = textCtrl->GetFont();
font.SetWeight(wxFONTWEIGHT_NORMAL);
font.SetPointSize(boxtext_size);
textCtrl->SetFont(font);
textCtrl->SetValue(contents.str());
textCtrl->SetToolTip(cstm_wrd[cstm_cnt]);

Regards,

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/CANdLyG3EA7JP52dAUq05PYXwhJy2E_a4hQOk7BOAR3q4Nv-pyw%40mail.gmail.com.
text_placement.PNG (image/png, 1.4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.