lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Wrong wxFlexGridSizer usage in about_dialog.cpp


From: Greg Chicares
Subject: Re: [lmi] Wrong wxFlexGridSizer usage in about_dialog.cpp
Date: Fri, 15 Jan 2010 15:32:55 +0000
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

On 2010-01-14 22:37Z, Vadim Zeitlin wrote:
> 
>      wxButton* cancel_button = new(wx) wxButton
>          (this
>          ,wxID_CANCEL
>          ,"Let me illustrate"
>          );
>  
> -    wxFlexGridSizer* sizer1 = new(wx) wxFlexGridSizer(1, 0, 0, 0);
> -    sizer1->AddGrowableCol(0);
> -    sizer1->AddGrowableCol(1);
> -    sizer1->Add(license_button, 1, wxALL|wxALIGN_LEFT , 2);
> -    sizer1->Add(cancel_button , 1, wxALL|wxALIGN_RIGHT, 2);
> +    wxBoxSizer* sizer_btn = new(wx) wxBoxSizer(wxHORIZONTAL);
> +    sizer_btn->Add(license_button, wxALL, 2);
> +    sizer_btn->Add(cancel_button, wxALL, 2);

Which override of Add() is being called on the last line?
Wouldn't it be the following:

    wxSizerItem* Add(wxWindow *window,
                     int proportion = 0,
                     int flag = 0,
                     int border = 0,
                     wxObject* userData = NULL);

so that the arguments would be:

  sizer_btn->Add
    (cancel_button // wxWindow *window    okay
    ,wxALL         // int proportion      ?
    ,2             // int flag            ?
    );

? I think of 'proportion' as wanting a value in [0, MAX_INT],
and 'flag' as wanting some wxXYZ macro.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]