Search found 16124 matches

by doublemax
Tue Jul 27, 2021 5:55 am
Forum: Platform Related Issues
Topic: Re: wxWindow::Refresh( EraseBackground, Rect )
Replies: 6
Views: 146

Re: wxWindow::Refresh( EraseBackground, Rect )

Rohit Agarwal wrote:
Tue Jul 27, 2021 5:35 am
All redraws do happen in PaintEvent handler,
When i said "everything", i meant to redraw the whole content unconditionally. Regardless of who or what initiated the redraw.
by doublemax
Tue Jul 27, 2021 5:31 am
Forum: General Development
Topic: Graphics Context Help
Replies: 3
Views: 89

Re: Graphics Context Help

I don't know which version of wxLua is the latest, but i pulled the repo from https://github.com/pkulchenko/wxlua and searching for "wxGraphicsContext", i see a lot of code. To me it looks like it's implemented. local gc = wx.wxGraphicsContext.Create(wx.wxMemoryDC()) I still don't see the part where...
by doublemax
Tue Jul 27, 2021 5:20 am
Forum: Platform Related Issues
Topic: Layout in a scrolled window
Replies: 30
Views: 1553

Re: Layout in a scrolled window

In the key down event handler I set the focus to the next row and call event.Skip(), otherwise the handler won't work. But then SetFocus() handler is executed and should set a focus to the 3rd row... I don't quite understand that. Let's say the first line is "active" and you press "key down". Then ...
by doublemax
Tue Jul 27, 2021 5:16 am
Forum: Platform Related Issues
Topic: Re: wxWindow::Refresh( EraseBackground, Rect )
Replies: 6
Views: 146

Re: wxWindow::Refresh( EraseBackground, Rect )

Just like i said in your previous thread: Make your life easier and redraw everything in the paint event handler. It will also make your code much cleaner, if you just have a state that you're changing, instead of keep track of what is already on screen and where and trying to update only parts of i...
by doublemax
Mon Jul 26, 2021 4:38 pm
Forum: Platform Related Issues
Topic: Layout in a scrolled window
Replies: 30
Views: 1553

Re: Layout in a scrolled window

If you call event.Skip in the handlers, they shouldn't interfere with anything. What else are you doing in the handler?
by doublemax
Mon Jul 26, 2021 4:35 pm
Forum: General Development
Topic: Graphics Context Help
Replies: 3
Views: 89

Re: Graphics Context Help

First of all, there is no need to use wxGraphicsContext this way. At least in C++ you can just create a wxGraphicsContext from a wxPaintDC, draw onto it, and that's it. There is no need to draw into a wxBitmap first. There are several "oddities" in your code which may or may not be responsible for t...
by doublemax
Mon Jul 26, 2021 5:00 am
Forum: Platform Related Issues
Topic: wxWidgets & Adobe Illustrator SDK
Replies: 1
Views: 36

Re: wxWidgets & Adobe Illustrator SDK

Try #defining __STDC_WANT_SECURE_LIB__ to 0 before including any wx headers. You may have to play around with include orders to make it work.
by doublemax
Sun Jul 25, 2021 9:48 pm
Forum: C++ Development
Topic: Event when click on menu
Replies: 4
Views: 87

Re: Event when click on menu

Please don't do this. When users click on items in the menubar, they expect a menu to open in which they can see what commands / actions are available. Immediately performing an action like opening a dialog would be quite confusing.

If you want those "direct to action" buttons, use a toolbar.
by doublemax
Sun Jul 25, 2021 9:51 am
Forum: Component Writing
Topic: Hypertext abstraction
Replies: 2
Views: 104

Re: Hypertext abstraction

I had an idea for adding a BBCode and MarkDown parser class to the HTML reader. Which "HTML reader" are you referring to? If you're talking about the wxWidgets internal HTML parser used by wxHTMLWindow, i think it's a waste of effort. It might be easier - and make more sense - to convert the BBCode...
by doublemax
Sun Jul 25, 2021 9:47 am
Forum: Platform Related Issues
Topic: Windows: destruction of wxTreeCtrl with many items is very slow
Replies: 3
Views: 91

Re: Windows: destruction of wxTreeCtrl with many items is very slow

I took the "treectrl" sample and changed MyFrame::OnAddManyItems() to add 10000 instead of 1000 items. After selecting "add many items" from the menu, I didn't notice any delay on construction.

So there must be some other factors involved.
by doublemax
Sat Jul 24, 2021 10:35 pm
Forum: Platform Related Issues
Topic: Layout in a scrolled window
Replies: 30
Views: 1553

Re: Layout in a scrolled window

Focus event for the text controls and combo boxes.
by doublemax
Sat Jul 24, 2021 10:22 pm
Forum: Platform Related Issues
Topic: Layout in a scrolled window
Replies: 30
Views: 1553

Re: Layout in a scrolled window

I thinks it's more universal to observe which control has focus and calculate the current line based on that. Then you could also get rid of the mouse click handler which does this at the moment.
by doublemax
Sat Jul 24, 2021 7:57 pm
Forum: Platform Related Issues
Topic: Layout in a scrolled window
Replies: 30
Views: 1553

Re: Layout in a scrolled window

ONEEYEMAN wrote:
Sat Jul 24, 2021 6:39 pm
I'm creating a panel with the default styles, which means TAB traversals handled by default, but I need to add the moving pointer.
What exactly is the problem, what are you trying to achieve?
by doublemax
Sat Jul 24, 2021 6:01 pm
Forum: Platform Related Issues
Topic: Layout in a scrolled window
Replies: 30
Views: 1553

Re: Layout in a scrolled window

doublemax wrote:
Fri Jul 23, 2021 4:04 pm
If you're using wx 3.1.5 or newer, at least under Windows this bug i had forgotten about could be the problem:
https://trac.wxwidgets.org/ticket/19170
Bug should be fixed as of today.
by doublemax
Sat Jul 24, 2021 5:57 pm
Forum: C++ Development
Topic: How to add command line arguments for wxApp?
Replies: 6
Views: 146

Re: How to add command line arguments for wxApp?

Return "false" from App::OnCmdLineParsed or App::OnInit. Like this? bool App::OnCmdLineParsed(wxCmdLineParser& parser) { if (!wxApp::OnCmdLineParsed(parser)) return false; if (parser.Found("version")) std::cout << "SampleHive v0.8.4_alpha.1" << std::endl; return false; // <------- } Yes, but of cou...