Is it allowed to Refresh() wxWindow from OnPaintEvent another brother wxWindow?

Black Jack <[email protected]> Thu, 20 Mar 2025 21:28:49 +0300
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <CA+jJYa=Y2b-FAfmtJkQxsGZWQEBBQ797pspMFNmDV+sHj8mBQw@mail.gmail.com>
Hello wx-users

I have wxScrolledWindow that have two wxWindows children.

I'd like to know is it allowed to Refresh() wxWindow from OnPaintEvent
another brother wxWindow?

Here is my code, it works OK.

void firstWxWindow::OnPaint(wxPaintEvent& event)
{
    wxPaintDC dc(this);
    //here goes any code

    // here is statment I'd like to know is it allowed to do so?
    anotherWxWindow->Refresh();
}

Won't this create any problems?

Thanks in advance.

-- 
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 visit https://groups.google.com/d/msgid/wx-users/CA%2BjJYa%3DY2b-FAfmtJkQxsGZWQEBBQ797pspMFNmDV%2BsHj8mBQw%40mail.gmail.com.