Exemple #1
0
    void ColorChooser::PreInit()
    {
      ColorView   *colorView;
      Panel       *hPanel;
      RGBControl  *rgb;

      hPanel=HPanel::Create(true,false);

      colorView=new ColorView();
      colorView->SetFlex(true,true);
      colorView->SetModel(color);
      hPanel->Add(colorView);

      hPanel->AddSpace();

      rgb=new RGBControl();
      rgb->SetModel(color);
      hPanel->Add(rgb);

      SetMain(VPanel::Create(true,false)
              ->Add(hPanel)
              ->AddSpace()
              ->Add(ButtonRow::CreateOkCancel(okAction,GetClosedAction(),true,false)));

      Dialog::PreInit();
    }