0

When working with guis of different kinds, I am used to the distinction of text field or text entry box versus text box. That is there is one type of object for the multi-line word processor style text box and another type of object for a single line, quite often non-scrollable text field / text entry box. Does wxTextCtrl serve both purposes? I know it does the text box but is it also the correct choice for the text field/text entry box?

EDIT There are actually 2 types of text boxes for multi-line entry as pointed out in the answers. What really interests me are widgets specific for single line entry versus widgets specific for multi-line entry.

4

2 に答える 2

1

wxTextCtrl serves for both single and multiline entry. It is quite powerful but not exactly 'word processor style'. Closer to that would be wxRichTextCtrl.

wxComboBox uses wxTextEntry ( as does wxTextCtrl in single-line mode ). Although wxTextEntry is not offered as a control itself - it does not inherit from wxControl - if you like it so much you might be able to build something using it. But it seems like a lot of trouble for benefits that I do not see.

于 2012-10-25T18:02:35.700 に答える
0

wxTextCtrl is a single line text control (what is called "entry" in other frameworks) by default. If you specify wxTE_MULTILINE style when creating it (this style can't be changed later), it becomes -- surprise -- a multi-line control, i.e. what is called "area" in other places.

于 2012-10-25T22:52:29.660 に答える