Bonjour a tt le mnd,
voici mon probleme, j'ai des elements dans wxListBox qui est dans une boite de dialogue, je veux selectionner un element de la wxListBox soit pour le supprimer, ou pour l'exporter dans une nouvelle boite de dialogue qui recevera cette element dans ca zone de texte.
autre questions.
mettre une valeur par défaut au spin button
mettre une sélection par défaut à la radiobox.


merci d'avance
Le un peu du 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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
 
// classe TriangleDialogue
 
class TriangleDialog : public wxDialog
{
public :
    TriangleDialog(wxWindow* parent, wxWindowID id, wxString const & title );
    void OnPropriete(wxCommandEvent& event);
    void OnSupprimer(wxCommandEvent& event);
 
private :
 
 
    wxListBox *item;
 
 
    DECLARE_EVENT_TABLE()
 
};
/ Creer un objet TriangleDialogue 
 
TriangleDialog ::TriangleDialog (wxWindow* parent, wxWindowID id, const wxString& titre):wxDialog( parent, id, titre)
 
{
 
 
sizer= new wxBoxSizer(wxHORIZONTAL);
 
 
 
wxString choix []={"Triangle 0", "Triangle 1", "Triangle 2"};
item = new wxListBox (this,-1,wxDefaultPosition,wxDefaultSize,3,choix,wxLB_NEEDED_SB|wxLB_SINGLE|wxLB_HSCROLL );
 
 
sizer->Add(item, 0, wxALIGN_CENTER| wxALL, 5);
this->SetAutoLayout(true);
this->SetSizer(sizer);
sizer->Fit( this );
sizer->SetSizeHints( this );
 
}
 
// Creer un objet Propriete
 
 
PropDialog ::PropDialog (wxWindow* parent, wxWindowID id, const wxString& titre):wxDialog( parent, id, titre)
 
{
 
wxBoxSizer *sizer= new wxBoxSizer(wxVERTICAL);
 
wxStaticText * item1 = new wxStaticText( this, ID_TEXTT, "Identifiant du triangle", wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
wxTextCtrl   * item2 = new wxTextCtrl(this,-1,"",wxDefaultPosition,wxDefaultSize);-1),wxSP_ARROW_KEYS,0,10,0);
 
 
 
sizer->Add(item1,0,wxALIGN_CENTER| wxALL, 5);
sizer>Add(item2,0,wxALIGN_CENTER| wxALL, 5);
 
this->SetAutoLayout(true);
this->SetSizer(sizer);
sizer->Fit(this);
sizer->SetSizeHints(this);
 
}