Bonjour,
J'ai besoin de votre aide pour modifier une wxToolBar dont voici le code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
pal = new wxToolBar(this, wxID_ANY, wxDefaultPosition, /*wxSize(20,20)*/wxDefaultSize, wxTB_VERTICAL | wxTB_FLAT /*| wxTB_DOCKABLE*/ | wxTB_NODIVIDER
  | wxTB_TEXT | wxTB_HORZ_LAYOUT);
 
 
  wxSpinCtrl* btn = new wxSpinCtrl(pal,ID_PalIntPoint,
                                _(""),
                                wxDefaultPosition, wxSize(40,20),
                                wxSP_ARROW_KEYS,
                                0,20,10, _T("wxSpinCtrl"));
 
  pal->SetToolBitmapSize(wxSize(48,48));
 
  pal->AddCheckTool(ID_PalZoom, _(""), palBitmaps[0], wxNullBitmap, _("Zoom\n\tUse: Wheel up & down"), _(""), NULL);
  pal->AddCheckTool(ID_PalRotation, _(""), palBitmaps[1], wxNullBitmap, _("Rotation\n\tUse: \n\t** Left click:  start rotation\n\t** Left click:  stop rotation\n\t** Right click: replace the object in his initial configuration"), _(""), NULL);
  pal->AddCheckTool(ID_PalLinesMod, _(""), palBitmaps[2], wxNullBitmap, _("Lines Display Mod"), _(""), NULL);
  pal->AddCheckTool(ID_PalColorMod, _(""), palBitmaps[3], wxNullBitmap, _("Color Display Mod"), _(""), NULL);
  pal->AddCheckTool(ID_PalIntPoint,_(""), palBitmaps[4], wxNullBitmap, _("Integer Points"), _(""), NULL); //on pourrait utiliser le addtool, et mettre wxITEm_NORMAL, ca épargne des lignes ds les methodes
  pal->AddCheckTool(ID_PalPicking,_(""), palBitmaps[8], wxNullBitmap, _("Picking"), _(""), NULL);
  pal->AddControl(btn); //j'ajoute mon spinCtrl
  pal->AddSeparator();
  pal->Realize();
Comme vous le voyez, j'ajoute un spin contrôle au niveau de la toolBar et j'obtient ceci :


(si l'image marche pas , voici le lien : http://picasaweb.google.com/Micro.mi...82537008068834

Ce que j'aimerais, c'est pouvoir mettre le spin control juste à côte de mon CheckTOol PalIntPoint ( et non en dessous) et tout aligner. Voici une représentation de ce que j'aimerais obtenir :


(http://picasaweb.google.com/Micro.mi...82540522550610)

Je ne sais pas vraiment comment faire, si je dois créer un contenant ( ou sizer? ) et c'est pourquoi j'ai besoin de votre aide.
Merci