diff options
| author | erco77 <erco@seriss.com> | 2020-08-01 14:35:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-01 14:35:44 -0700 |
| commit | 7abc09ad89b4c3d0c17ee8dc9d02ccd261cd13f2 (patch) | |
| tree | 72e461bac5930f8a319d48a6ea99ba793dd35a8b /examples/table-as-container.cxx | |
| parent | 7514a73ba759f7fc9965eeef3b92ece899bd7a69 (diff) | |
| parent | e9688822ec68f066f425953278a853e049b93dfb (diff) | |
Merge pull request #116 from erco77/fl_strdup
fl_strdup() implemented + deployed
Diffstat (limited to 'examples/table-as-container.cxx')
| -rw-r--r-- | examples/table-as-container.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/table-as-container.cxx b/examples/table-as-container.cxx index 515ad884f..d5887439d 100644 --- a/examples/table-as-container.cxx +++ b/examples/table-as-container.cxx @@ -75,7 +75,8 @@ public: } else { // Create the light buttons sprintf(s, "%d/%d ", r, c); - Fl_Light_Button *butt = new Fl_Light_Button(X,Y,W,H,strdup(s)); + Fl_Light_Button *butt = new Fl_Light_Button(X,Y,W,H); + butt->copy_label(s); butt->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE); butt->callback(button_cb, (void*)0); butt->value( ((r+c*2) & 4 ) ? 1 : 0); |
