Search found 80 matches

by fancyivan
Mon Jan 27, 2014 5:32 am
Forum: C++ Development
Topic: Change border color of focused cell in wxGrid
Replies: 3
Views: 1288

Change border color of focused cell in wxGrid

Hello,

when we click one cell in wxGrid, this cell will be focused and selected. there will be a BLACK border in the cell. if we select many cells, the BLACK border will change to WHITE.

is there any way to change this border color? is it hardcoded in source code?

Thank you.

Tao
by fancyivan
Mon Jan 13, 2014 2:50 pm
Forum: C++ Development
Topic: Merge Cells in wxGrid
Replies: 1
Views: 932

Re: Merge Cells in wxGrid

first of all, sorry for my english, may be I didn't describe my question clear. after debuging and testing again and again at 3 nights, I think I found the right place. I tested the following codes for cell(0, 0) when I saw incorrect displaying: int m, n; wxGridCellAttrProvider *pro = m_grid->GetTab...
by fancyivan
Sun Jan 05, 2014 10:04 am
Forum: wxWidgets Development (Chinese)
Topic: 汉字与unicode文本之间的转化问题
Replies: 5
Views: 3037

Re: 汉字与unicode文本之间的转化问题

const char *c = "\u4f26\u6566"; wxString cs(c, wxConvUTF8); wxLogMessage(cs); //在界面上就会显示 伦敦 二字 int IntFromHexChar(char a) { if(a>='0' && a<='9')return a-0x30; else if(a>='A' && a<='F')return a-'A'+10; else if(a>='a' && a<='f')return a-'a'+10; else return 17; } const wxString Utf8stringTowxString(co...
by fancyivan
Sun Jan 05, 2014 8:24 am
Forum: C++ Development
Topic: Merge Cells in wxGrid
Replies: 1
Views: 932

Merge Cells in wxGrid

Hello, Win7 + MinGW32 + wxWidgets3.0.0 + Codebocks13.12 I want to show some data(from database) in wxgrid. Therefore, I create a class customTable: public wxGridTableBase, and bind it with wxGrid by using SetTable(). And then I need merge every 3 cells of first column: for example: merge cell(0,0) +...
by fancyivan
Tue Nov 26, 2013 3:00 am
Forum: C++ Development
Topic: generate bitmap for state "current" of bitmapButton
Replies: 3
Views: 1430

Re: generate bitmap for state "current" of bitmapButton

I think it is not job of wxWidgets itself. I created a template (106*26) for generating Bitmap (wxBitmapButton: 26 * 26) in GIMP. There are totally 8 layers in it. 4 different backgrounds(layers) for each state of BitmapButton. and 4 layers for foreground of button. If you want to create new bitmap ...
by fancyivan
Mon Nov 25, 2013 4:39 am
Forum: wxWidgets Development (Chinese)
Topic: CB+wxwidgets+wxsmith可编译通过,但运行崩溃
Replies: 2
Views: 2126

Re: CB+wxwidgets+wxsmith可编译通过,但运行崩溃

wxsmith向导生成的带//*(....//*)这类注释是与界面关联而自动生成的。
如果你使用wxsmith修改了界面,这里面的东西会自动调整。你自己手动修改里面的代码被会冲掉的。


报错问题,信息量感觉不够,无法判断。即然minimal和手动创建的项目可正常运行,那就再对比一下与wxsmith生成的项目的区别吧。
by fancyivan
Thu Nov 21, 2013 9:39 am
Forum: C++ Development
Topic: open file in zip file archive
Replies: 6
Views: 2011

Re: open file in zip file archive

has maybe anybody an example or his code snippet for me, how he extract any files (xml) from a compressed (zip) file? That would help me a lot. Thanks in advance. // in ggeiApp.h class ggeiApp : public wxApp { public: virtual bool OnInit(); }; // in ggeiApp.cpp bool ggeiApp::OnInit() { wxFileSystem...
by fancyivan
Thu Nov 21, 2013 6:54 am
Forum: C++ Development
Topic: Using wxWebView to create C++ app with HTML user interface
Replies: 7
Views: 3966

Re: Using wxWebView to create C++ app with HTML user interfa

1 year ago, I did the same thing with earnif. 1. Add Event in EventTable: EVT_WEB_VIEW_TITLE_CHANGED(ID_Browser, ggeiFrame::OnCallBack) c++ code will comunicate with html by using this event handle. 2. in html, add button by using javascript: <script type="text/javascript"> function Delete(i){if(con...
by fancyivan
Wed Jul 17, 2013 2:53 am
Forum: wxWidgets Development (Chinese)
Topic: 求助,如何画出一个抗锯齿的圆(棋子)?
Replies: 1
Views: 3499

Re: 求助,如何画出一个抗锯齿的圆(棋子)?

Mayaweiqi wrote:初学,希望越详细越好.
dc.DrawCircle(x,y,r) 这样的圆有锯齿,因为要画棋子,所以必须特别圆才能达到要求.有锯齿肯定不行.
直接贴图会不会更好一些?
by fancyivan
Thu Jul 11, 2013 8:09 am
Forum: wxWidgets Development (Chinese)
Topic: wxWidgets自定义控件开发
Replies: 3
Views: 4914

Re: wxWidgets自定义控件开发

楼主这重复铺贴可够猛的
by fancyivan
Thu Jul 11, 2013 8:06 am
Forum: wxWidgets Development (Chinese)
Topic: [求助]交叉编译wxwidgets-2.9.4遇到了问题
Replies: 5
Views: 7614

Re: [求助]交叉编译wxwidgets-2.9.4遇到了问题

想问下wxWidgets系统会不会回收Panel啊,我这里有切换页面的操作,我在每一个切换页面的操作里新创建了一个wxPanel,但是如果我在创建前释放掉前面的panel的话,会造成一个段错误,我也不知道是为什么造成的那样的错误。 我想问下我在每次都new 一个新的panel,wx的系统有没有去回收那些panel,也就是我的这种操作会不会造成内在泄漏呢? wx会自己管理所有new出来的控件。 比如你在你的myframe:wxframe里new wxPanel(this); 当你的myframe退出时,它会自己去destroy你创建的所有子控件。 另外,你是如何翻译掉前面的panel的? my...
by fancyivan
Mon May 13, 2013 3:18 am
Forum: wxWidgets Development (Chinese)
Topic: wx处理按钮重叠,覆盖问题
Replies: 5
Views: 7482

Re: wx处理按钮重叠,覆盖问题

wxMSW可以配置成使用wxWidgets自己的窗口控件,应该是指是使用是否开启wxUniversal吧。在你编译wxWidgets时的配置文件configure里。 默认是不启用wxUniversal的,就是使用windows本身的样式。 这个网页里面有我写的按钮覆盖的程序,这里其它的问题都已经解决了,只是linux平台和windows平台上的显示的顺序不一样,请各位高手帮我解决一下这个问题哦。这一个帖子的程序在windows上还有linux上都是可以运行的。另外 wxMSW可以配置成使用wxWidgets自己的窗口控件,这句话怎么理解,我怎么配置才能知道是不是在使用wxWidgets自己的...
by fancyivan
Mon Apr 15, 2013 2:33 pm
Forum: General Development
Topic: Best way to 'export' to MS Word table
Replies: 3
Views: 3361

Re: Best way to 'export' to MS Word table

I think it is the most common or easy way to export sth to MS Word by using wxAutomationObject. there are 2 ways I think : A) get data from grid and put data into MS Word. B) copy, then paste I finished a small application 2 months ago, the requirements are: 1.show the result in a table 2.draw a cha...
by fancyivan
Mon Apr 15, 2013 8:57 am
Forum: wxWidgets Development (Chinese)
Topic: Dialog中按以下按钮就改变wxTextCtrl中的内容怎么做啊?
Replies: 2
Views: 5868

Re: Dialog中按以下按钮就改变wxTextCtrl中的内容怎么做啊?

两种方法 1. 在类中定义private变量,在OnButtonClick中直接使用 如: class yourDlg { private: wxTextCtrl* m_txt_1; } void Click() { m_txt_1->SetValue.... } 2.使用FindWindow,根据ID在正确的parent上(可能是Dialog,也许你将这些textCtrl放在某个panel上了)查找你的TextCtrl,然后使用。如: void Click() { wxTextCtrl *txt = (wxTextCtrl*)(this->FindWindow(IDIDIDIDIDID));...