Setting focus to the grid in notebook

0 views
Skip to first unread message

iko...@earthlink.net

unread,
Dec 17, 2009, 1:19:12 AM12/17/09
to wx-users
Hi, ALL,
I have a notebook and one of the pages consist of one grid.
What I want to do is when the user changes the page to the one
with the grid give focus to the grid.

So I override the page changed event but I have 2 problems.

1. If I just leave the processing to me, the grid won't be painted
on the screen.
2. If I call event.Skip() at the end of processing, the page will
have the focus.

Any idea on how to solve this?\

Thank you.

Vadim Zeitlin

unread,
Dec 17, 2009, 5:47:11 AM12/17/09
to wx-u...@googlegroups.com
On Wed, 16 Dec 2009 22:19:12 -0800 (GMT-08:00) iko...@earthlink.net wrote:

> I have a notebook and one of the pages consist of one grid.
> What I want to do is when the user changes the page to the one
> with the grid give focus to the grid.

Normally this should already work. If it doesn't, try also putting this
grid inside a wxPanel.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/

iko...@earthlink.net

unread,
Dec 17, 2009, 4:14:27 PM12/17/09
to wx-u...@googlegroups.com
Vadim,


-----Original Message-----
>From: Vadim Zeitlin <va...@wxwidgets.org>
>Sent: Dec 17, 2009 2:47 AM
>To: wx-u...@googlegroups.com
>Subject: Re: Setting focus to the grid in notebook
>
>On Wed, 16 Dec 2009 22:19:12 -0800 (GMT-08:00) iko...@earthlink.net wrote:
>
>> I have a notebook and one of the pages consist of one grid.
>> What I want to do is when the user changes the page to the one
>> with the grid give focus to the grid.
>
> Normally this should already work. If it doesn't, try also putting this
>grid inside a wxPanel.

The grid _is_ inside the panel.
Maybe all I need is to use grid without the panel?

But then it does not make sense. In my case there is only grid in the notebook
page, but somebody else might have other contros as well.

Thank you.

Reply all
Reply to author
Forward
0 new messages