Search found 48 matches

by shawnee
Fri Dec 07, 2018 6:21 am
Forum: C++ Development
Topic: alignment problem of vertical style toolbar
Replies: 3
Views: 61

Re: alignment problem of vertical style toolbar

ONEEYEMAN wrote:Hi,
Is it reproducible in the toolbar sample?

Thank you.

the codes are not from wxWidgets toolbar sample.
this toolbar is just as an embeded controls into a ribbon panel.
by shawnee
Thu Dec 06, 2018 7:18 am
Forum: C++ Development
Topic: alignment problem of vertical style toolbar
Replies: 3
Views: 61

alignment problem of vertical style toolbar

I created a vertical sytle wxToolbar(wxTB_VERTICAL | wxTB_FLAT | wxTB_NODIVIDER | wxTB_HORZ_LAYOUT | wxTB_TEXT). The upper toolbutton is a normal button. The lower toolbutton is a button with dropdown menu. Both of buttons have the same icon(16x16). As you see, they are not left-alignment. How could...
by shawnee
Fri Nov 23, 2018 8:12 am
Forum: Component Writing
Topic: Dark skinned application that flashes when started
Replies: 12
Views: 748

Re: Dark skinned application that flashes when started

Hi, I am developing a dark "skinned" application with buttons, check boxes, ... each derived form wxPanel or wxWindow. Everything works fine but when the application starts and the main frame is displayed, all the skinned objects flash once (it's very fast) as white rectangles just before...
by shawnee
Sat Nov 17, 2018 12:14 pm
Forum: C++ Development
Topic: How to set font for one of toolbutton in wxToolbar?
Replies: 13
Views: 280

Re: How to set font for one of toolbutton in wxToolbar?

doublemax wrote:You should also ask yourself if this all is worth the effort. It'll be an unusual GUI design element to say the least, i don't think i've ever seen this anywhere.


Anyway, I still think it is strange there is no member function to set font for label of individual toolbutton.
by shawnee
Sat Nov 17, 2018 2:46 am
Forum: C++ Development
Topic: How to set font for one of toolbutton in wxToolbar?
Replies: 13
Views: 280

Re: How to set font for one of toolbutton in wxToolbar?

ONEEYEMAN wrote:Hi,
What if you try to add control to toolbar and use wxBitmapButton?

Thank you.


it's good idea, but how can I let wxButton as flat style just looks like toolbutton on wxToolBar?
by shawnee
Sat Nov 17, 2018 1:08 am
Forum: C++ Development
Topic: How to set font for one of toolbutton in wxToolbar?
Replies: 13
Views: 280

Re: How to set font for one of toolbutton in wxToolbar?

I thought out a trick way to show different(bold) font on a toolbutton. That's render icon and bold font label into a bitmap together, then set this rendered bitmap as the bitmap of this toolbutton. There are two difficult obstacles to me. 1. each of label has different length(but the lenght of stri...
by shawnee
Sat Nov 17, 2018 12:58 am
Forum: C++ Development
Topic: Is it possible to do drag&drop on toolbutton of wxToolBar? [SOLVED]
Replies: 12
Views: 311

Re: Is it possible to do drag&drop on toolbutton of wxToolBar? [SOLVED]

doublemax wrote:If the button should still work when clicked, i can't think of any way to avoid that.


Is it possible to cancel/kill the mouse dragging status when do dragging on not be draggable toolbutotn?
by shawnee
Fri Nov 16, 2018 2:11 pm
Forum: C++ Development
Topic: Is it possible to do drag&drop on toolbutton of wxToolBar? [SOLVED]
Replies: 12
Views: 311

Re: Is it possible to do drag&drop on toolbutton of wxToolBar? [SOLVED]

int wxItemid = base->GetId(); You have identified the toolbutton here. If it's a button that should not be draggable, just do nothing. BTW: You should call event.Skip() if you don't start a dragging operation, so that the default event handling takes place. event.Skip() works, but the toolbutton th...
by shawnee
Fri Nov 16, 2018 1:08 pm
Forum: C++ Development
Topic: Is it possible to do drag&drop on toolbutton of wxToolBar? [SOLVED]
Replies: 12
Views: 311

Re: Is it possible to do drag&drop on toolbutton of wxToolBar? [SOLVED]

If some of toolbuttons couldn't do drag on wxToolBar, how to cancel the dragging? I'm not 100% sure i understand what you mean. Can you use wxToolBar::FindToolForPosition() to identify the tool you clicked on? I bind event like this: wxToolBar * PToolbar = new wxToolBar (...) PToolbar->Bind(wxEVT_M...
by shawnee
Fri Nov 16, 2018 7:43 am
Forum: C++ Development
Topic: Is it possible to do drag&drop on toolbutton of wxToolBar? [SOLVED]
Replies: 12
Views: 311

Re: Is it possible to do drag&drop on toolbutton of wxToolBar? [SOLVED]

I tried dragging operation on toolbutton, it would not trigger single clicking event on this toolbutton. It will not trigger a dedicated drag event, but if you catch generic mouse events and check wxMouseEvent::Dragging() it should be possible to start a drag operation from there. Hi doublemax, If ...
by shawnee
Fri Nov 16, 2018 3:11 am
Forum: C++ Development
Topic: Is it possible to do drag&drop on toolbutton of wxToolBar? [SOLVED]
Replies: 12
Views: 311

Re: Is it possible to do drag&drop on toolbutton of wxToolBar? [SOLVED]

I tried dragging operation on toolbutton, it would not trigger single clicking event on this toolbutton. It will not trigger a dedicated drag event, but if you catch generic mouse events and check wxMouseEvent::Dragging() it should be possible to start a drag operation from there. It's settled down...
by shawnee
Thu Nov 15, 2018 12:52 pm
Forum: C++ Development
Topic: Is it possible to do drag&drop on toolbutton of wxToolBar? [SOLVED]
Replies: 12
Views: 311

Re: Is it possible to do drag&drop on toolbutton of wxToolBar? [SOLVED]

As wxToolBar derives from wxWindow, it should work as a drop target (wxWindow::SetDropTarget). Then you could use wxToolBar::FindToolForPosition() to find the button where the drop happened. But i can't think of any way to start a drag from a toolbar button if a click on that button should also wor...
by shawnee
Thu Nov 15, 2018 3:24 am
Forum: C++ Development
Topic: Is it possible to do drag&drop on toolbutton of wxToolBar? [SOLVED]
Replies: 12
Views: 311

Is it possible to do drag&drop on toolbutton of wxToolBar? [SOLVED]

Hi, All,

I'd like to do drag&drap on toolbutton. I want to drag a toolbutton and drop it to other window.
Can I do this? I checked document, it seems there is no drag&drop message event for wxToolBar.
Thanks!
by shawnee
Wed Oct 31, 2018 12:24 am
Forum: C++ Development
Topic: How to set font for one of toolbutton in wxToolbar?
Replies: 13
Views: 280

Re: How to set font for one of toolbutton in wxToolbar?

Not sure is it really can to be done. What about method GetControl/1 ? Something like m_toolBar->FindControl(toolid)->SetFont(ft); but with all necessary checkings(on NULL). Though maybe it will work only for controls that was added via AddControl . Yes, you are right. it will work only for control...
by shawnee
Wed Oct 31, 2018 12:20 am
Forum: C++ Development
Topic: How to set font for one of toolbutton in wxToolbar?
Replies: 13
Views: 280

Re: How to set font for one of toolbutton in wxToolbar?

Hi, Are you trying it for the button or some other control? Maybe you can cast it to the button and set the font this way? Something like this: wxToolBarToolBase * toolbutton = toolbar->FindById(toolid); assert(toolbutton != NULL); if( toolbutton.IsButton() ) { wxButton *button = (wxButton *) toolb...

Go to advanced search