Search found 12 matches

by psion_revo
Wed Feb 17, 2016 7:20 pm
Forum: C++ Development
Topic: How to prorer set wxGridCellRenderer for xGrid by SetColAttr()?
Replies: 3
Views: 581

Re: How to prorer set wxGridCellRenderer for xGrid by SetColAttr()?

Thank you for right direction! I've tried: wxGridCellAttr* pAttr = new wxGridCellAttr; pAttr->IncRef(); pAttr->IncRef(); Problem still exists. After your answer, I've started look for IncRef() and SetCellEditor and have found very good explanation (don't know is it good to put it here?): From vadim ...
by psion_revo
Wed Feb 17, 2016 3:29 pm
Forum: C++ Development
Topic: How to prorer set wxGridCellRenderer for xGrid by SetColAttr()?
Replies: 3
Views: 581

How to prorer set wxGridCellRenderer for xGrid by SetColAttr()?

Hi, I will need to create own wxGridCellRenderers and wxGridCellEditors in my proj. So, I try to understand how it should work. First, I've found that I need to use IncRef() before SetColAttr(). Now,I have another error when I close an app: "Assert GetEventHandler()==this failed in ~wxWindowBase: an...
by psion_revo
Sun Feb 14, 2016 11:45 am
Forum: C++ Development
Topic: How should I store wxStrings in memory?
Replies: 4
Views: 535

Re: How should I store wxStrings in memory?

doublemax wrote:But as a former assembly programmer, i know the pain
My first prog was for PDP11. And next was Pascal.
I want to use C++ everywhere in my projects (for AVR,Win,Linux) to share parts of my code.
Hope, I will feel good inside C++ before my last day :)
Your help saves hours for me. Have a good health!
by psion_revo
Sun Feb 14, 2016 11:21 am
Forum: C++ Development
Topic: How should I store wxStrings in memory?
Replies: 4
Views: 535

Re: How should I store wxStrings in memory?

doublemax wrote:Make your life easy
Thanks!

But I want a faster life too :)
I'm not sure, that vector, list, etc. will be faster than wxString * array[].
I want a direct access if the array will not grow.
Am I wrong?
Should I forget about direct access?
by psion_revo
Sun Feb 14, 2016 11:09 am
Forum: Database Related
Topic: What is a correct way to fill wxGrid from wxSQLite3Table?
Replies: 2
Views: 3490

Re: What is a correct way to fill wxGrid from wxSQLite3Table?

You need to create your GridTable Class Thanks! Will try to do it. Now, I just can fill wxGrid from a table like this. try { wxSQLite3Statement ls=db->PrepareStatement("SELECT id,name FROM table ORDER BY id"); wxSQLite3ResultSet lr=ls.ExecuteQuery(); int ln=lr.GetColumnCount(); grid_table->CreateGr...
by psion_revo
Sun Feb 14, 2016 11:00 am
Forum: C++ Development
Topic: How should I store wxStrings in memory?
Replies: 4
Views: 535

How should I store wxStrings in memory?

Hi, I'm new in C++. I need to load string values from a database table into an array. And then I need to get a string value pointer by an index with function get(). Here is my class. class db_setup { public: db_setup(wxSQLite3Database * db); virtual ~db_setup(); //return pointer to wxString with ind...
by psion_revo
Wed Feb 10, 2016 8:21 pm
Forum: Database Related
Topic: What is a correct way to fill wxGrid from wxSQLite3Table?
Replies: 2
Views: 3490

What is a correct way to fill wxGrid from wxSQLite3Table?

I don't want double buffering.
First, I've got wxSQLite3Table as a result of execution of my SQL query.
Second, I need to copy all data from wxSQLite3Table to wxGrid.
Third, I need to destroy wxSQLite3Table.

Is it a correct way?
Thanks!
by psion_revo
Mon Feb 08, 2016 9:22 am
Forum: Database Related
Topic: What to do if I need a small database
Replies: 5
Views: 2091

Re: What to do if I need a small database

you can add the wxSQLite3 and the SQLite Amalgamation source files to your project as if it were your own source files. Yes! It works. Just add to project folder: sqlite3.c sqlite3.h wx/wxsqlite3.h wx/wxsqlite3.cpp wx/wxsqlite3def.h wx/wxsqlite3opt.h And add project path to search compile path. dou...
by psion_revo
Sun Feb 07, 2016 3:34 pm
Forum: Database Related
Topic: What to do if I need a small database
Replies: 5
Views: 2091

Re: What to do if I need a small database

No, you can add the wxSQLite3 and the SQLite Amalgamation source files to your project as if it were your own source files. Good. Will try to do it. But I'm afraid it will need more skills that I have. You can derive your own class from wxGridTableBase and set it with wxGrid::SetTable(). Yes. Thank...
by psion_revo
Sun Feb 07, 2016 11:47 am
Forum: Database Related
Topic: What to do if I need a small database
Replies: 5
Views: 2091

Re: What to do if I need a small database

For around 1000 lines reading and writing to a text file should be fast enough. Thank you. Alternatively you could use sqlite + wxSQlite3 which works with local files and can be embedded into your application. In this case, I will need to install SQLite3. But I really want all-in-one. And the probl...
by psion_revo
Sun Feb 07, 2016 11:12 am
Forum: C++ Development
Topic: How to remove default first row with row numbers in wxGrid?
Replies: 1
Views: 429

How to remove default first row with row numbers in wxGrid?

I create an wxGrid object and then

Code: Select all

CreateGrid(0,1);
.
But I've got 2 rows instead of 1.
A question is: how to remove default first row with row numbers in wxGrid?

Thanks.
by psion_revo
Sun Feb 07, 2016 10:31 am
Forum: Database Related
Topic: What to do if I need a small database
Replies: 5
Views: 2091

What to do if I need a small database

I am a new in Codeblocks/wxSmith/wxWidgets. I am doing an user interface for a home radio network. And I would like to port it to Android in future. So, I don't want to use MySQL or something. I prefer one application all-in-one. Is it possible to make a small database inside wxGrid objects (let the...