Grid row to fit the screen

11 views
Skip to first unread message

Igor Korot

unread,
Jul 1, 2022, 1:25:30 AMJul 1
to wx-u...@googlegroups.com
Hi, ALL,
I have a dialog where I use wxGrid.
The grid is initially empty and I add the columns to it on demand.

One row in the grid all throughout is using the wxCjhoice Editor.

Is there a simple way to ensure that the width of the column in the
grid is big enough
so that when I display the choice editor by clicking on it the combo box
is fit in the column?

The strings I use in the editor are the same for all columns.

Thank you.

Vadim Zeitlin

unread,
Jul 2, 2022, 9:37:48 AMJul 2
to wx-u...@googlegroups.com
On Fri, 1 Jul 2022 00:37:18 -0500 Igor Korot wrote:

IK> Is there a simple way to ensure that the width of the column in the
IK> grid is big enough so that when I display the choice editor by clicking
IK> on it the combo box is fit in the column?

I don't know if it counts as being simple enough, but you can create a
wxChoice with your strings (without showing it) and size the column or your
grid to its GetBestSize().x.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Reply all
Reply to author
Forward
0 new messages