Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    [C++/WxWidgets]Creare procedure/eventi in wx-devcpp

    Ciao,
    Ho da poco iniziato a programmare con le WxWidgets in devcpp e ho il seguente problema:
    Avendo, sempre, usato ambienti RAD non riesco a creare le "così dette" procedure associate ai possibili eventi...
    Ecco un banale esempio di codice:

    #include "Progetto1Frm.h"
    BEGIN_EVENT_TABLE(Progetto1Frm,wxFrame)
    EVT_CLOSE(Progetto1Frm::Progetto1FrmClose)
    END_EVENT_TABLE()
    Progetto1Frm::Progetto1Frm( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style )
    : wxFrame( parent, id, title, position, size, style)
    {
    CreateGUIControls();
    }

    Progetto1Frm::~Progetto1Frm() {}

    void Progetto1Frm::CreateGUIControls(void)
    {
    WxButton1 = new wxButton(this, ID_WXBUTTON1, wxT("WxButton1"), wxPoint(89,128), wxSize(102,37), 0, wxDefaultValidator, wxT("WxButton1"));

    textData = new wxTextCtrl(this, ID_TEXTDATA, wxT("textData"), wxPoint(91,67), wxSize(104,43), 0, wxDefaultValidator, wxT("textData"));
    textData->SetMaxLength(0);

    this->SetStatusBar(m_pStatusBar);
    this->SetSize(8,8,320,334);
    this->SetTitle(wxT("Progetto1"));
    this->Center();
    this->SetIcon(wxNullIcon);
    }

    void Progetto1Frm::Progetto1FrmClose(wxCloseEvent& event)
    {
    Destroy();
    }

    C'è un wxbutton e una wxTextCtrl, come posso assegnare un valore alla wxTextCtrl alla pressione del bottone ?

    Ringrazio in anticipo chi mi risponderà
    Experience is what you get when you don’t get what you want

  2. #2
    Mi ringrazio solo (ho risolto)...
    Però alcune volte mi viene il dubbio:
    • Sono troppo bravo e faccio domande troppo difficili?
    • Sono troppo stupido e faccio domande altrettanto stupide?

    Bha ...
    Ai posteri l'ardua sentenza
    Experience is what you get when you don’t get what you want

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.