cs_satellite34
Messages postés688Date d'inscriptionmercredi 6 avril 2005StatutMembreDernière intervention 2 juin 2006
-
7 sept. 2005 à 04:41
fredcl
Messages postés547Date d'inscriptionmercredi 8 janvier 2003StatutMembreDernière intervention 7 octobre 2007
-
7 sept. 2005 à 17:09
Bonjour,
alors voila, encore un petit soucis avec les sizers ( c' était trop beau pour etre vrai ) :
Utilisant, dans mon programme, une ToolBar avec plusieurs contrôles dedans, je me retrouve avec mes ToolsControls effacés dans les méandres de la frame, dés que je resize ma frame.
Donc, je veux mettre ma ToolBar et tous ses toolsControls dans un sizer Horizontal de maniere à ce que les controles soient le plus possible visibles.Et puis, en terme graphique c'est quand meme mieux:;)
Donc, pour cette affaire je creer un wxBoxSizer avec orientation HORIZONTAL;
bSizer3 = new wxBoxSizer(wxVERTICAL);
Je dis que c' est la tool bar qui prends le sizer;;;; enfin, sur la doc ya pas cette fonction dans les membres de wxToolBar;alors..... autant c' est ca qui "chie dans la colle...."
ToolBar->SetSizer(bSizer3);
fredcl
Messages postés547Date d'inscriptionmercredi 8 janvier 2003StatutMembreDernière intervention 7 octobre 20071 7 sept. 2005 à 17:09
Si c'est pour ton client FTP tu verras que je n'ai pas utilisé de toolbar mais un wxPanel tout simplement, je poste sur l'autre question du forum une source pour l'organisation de ta fenêtre client FTP
// create text ctrl with minimal size 100x60
topsizer->Add(
new wxTextCtrl( this, -1, "My text.", wxDefaultPosition, wxSize(100,60), wxTE_MULTILINE),
1, // make vertically stretchable
wxEXPAND | // make horizontally stretchable
wxALL, // and make border all around
10 ); // set border width to 10
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
button_sizer->Add(
new wxButton( this, wxID_OK, "OK" ),
0, // make horizontally unstretchable
wxALL, // make border all around (implicit top alignment)
10 ); // set border width to 10
button_sizer->Add(
new wxButton( this, wxID_CANCEL, "Cancel" ),
0, // make horizontally unstretchable
wxALL, // make border all around (implicit top alignment)
10 ); // set border width to 10
topsizer->Add(
button_sizer,
0, // make vertically unstretchable
wxALIGN_CENTER ); // no border and centre horizontally
SetSizer( topsizer ); // use the sizer for layout
topsizer->SetSizeHints( this ); // set size hints to honour minimum size
}