| 493 | |
| 494 | |
| 495 | void EffectUIHost::OnInitDialog(wxInitDialogEvent & evt) |
| 496 | { |
| 497 | // Do default handling |
| 498 | wxDialogWrapper::OnInitDialog(evt); |
| 499 | |
| 500 | #if wxCHECK_VERSION(3, 0, 0) |
| 501 | //#warning "check to see if this still needed in wx3" |
| 502 | #endif |
| 503 | |
| 504 | // Pure hackage coming down the pike... |
| 505 | // |
| 506 | // I have no idea why, but if a wxTextCtrl is the first control in the |
| 507 | // panel, then its contents will not be automatically selected when the |
| 508 | // dialog is displayed. |
| 509 | // |
| 510 | // So, we do the selection manually. |
| 511 | wxTextCtrl *focused = wxDynamicCast(FindFocus(), wxTextCtrl); |
| 512 | if (focused) |
| 513 | { |
| 514 | focused->SelectAll(); |
| 515 | } |
| 516 | } |
| 517 | |
| 518 | void EffectUIHost::OnErase(wxEraseEvent & WXUNUSED(evt)) |
| 519 | { |