Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9230349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:48:14+00:00 2026-06-18T05:48:14+00:00

I tried to implement a custom wxGrid with custom labels. According to the wxwidgets

  • 0

I tried to implement a custom wxGrid with custom labels. According to the wxwidgets documentation, it is necessary to implement the Method: SetColLabelValue and GetColLabelValue. Sadly, the methods from the wxGridTableBase class won’t get overriden by my code.

#pragma once
#include <wx/grid.h>
#include <wx/string.h>
#include <wx/event.h>
#include <wx/string.h>
#include <vector>
class Grid :
    public wxGrid
{
    unsigned int m_rows_occupied;
    std::vector<wxString> m_colLabels;
    wxString* m_colLabelsArr;
public:
    Grid(wxWindow* _parent,wxWindowID _ID,wxPoint _pos,wxSize _size,long _style);
    ~Grid(void);
    void InsertValues(char* _col1,char* _col2);
    void SetRow(unsigned int _row,char* _col1,char* _col2);
    void SetCell(unsigned int _row,unsigned int _cell,char* _col1);
    unsigned int* Size(void){return &m_rows_occupied;};
    virtual void SetColLabelValue( int WXUNUSED(col), const wxString& )override;
    virtual wxString GetColLabelValue(int col) override{return wxString("");};
};
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T05:48:15+00:00Added an answer on June 18, 2026 at 5:48 am

    You’ve mixed up methods in wxGrid and wxGridTableBase. If you want to use a custom table, you need to derive your table class from the latter, not the former.

    Of course, if you just need to customize some labels, there is no need to use a custom table at all, just call wxGrid::SetColLabelValue() to set them to whatever you need.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried to implement this example to write and read data from internal storage,
I want to implement Custom Dialog in Android. However , when I tried it
I got an app, where i tried to implement custom camera. This is source
As The Title said, I tried to implement a custom taxonomy in wordpress, i
Hello I tried to implement a custom QAbstractModel to use it on QtreeView. Main
I tried to implement the custom ListField with checkboxes in blackberry. I'm able to
I tried to implement the Hover effect for images just like Google Images in
I tried to implement __concat__ , but it didn't work >>> class lHolder(): ...
I tried to implement XOR swap in python. x,y= 10,20 x,y,x = x^y,x^y,x^y print('%s
I tried to implement the following in less: nav > ul > li:first-child using:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.