Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / wxPlotWindow problem

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. wxPlotWindow problem
#3698
Posted by: 2004-04-02 07:56:50
Dear experts,

I try to generate a wxPlotWindow with buttons for zooming etc. in another window.
When I code it as below, all buttons are painted on top of each other.

code for 2 windwos displayed in the same wxScrolledWindow follows:

myTextCtrl2 = new wxTextCtrl( 
    myScrolledWindow, 
    -1,  
    wxString("Some text"),
    wxPoint(100,000), 
    wxSize(885,50), 
    wxTE_MULTILINE | wxTE_RICH);
  
 
myPlotWindow = new wxPlotWindow(
    myScrolledWindow,
    -1, 
    wxPoint (100,050),
    wxSize (885,250),
    wxSUNKEN_BORDER | 
    wxPLOT_BUTTON_ZOOM | 
    wxPLOT_BUTTON_MOVE | 
    wxPLOT_BUTTON_ENLARGE
    );  
when I put the wxPlotWindow as below, everything is fine.

PlotFrame *frame02 = new PlotFrame("Simple Plot Frame", 100, 300, 800, 300);
    frame02->Show(TRUE);
    SetTopWindow(frame02);


any clues?

all input is welcome,

wolfi

if necessary at all, I'm using wxWindows 2.4.2, DevCpp 4.9.8.5 and W2K
Message2. Re: wxPlotWindow problem
#3728
Posted by: 2004-04-04 17:12:26
Meanwhile, I have found out some more details:

As described in my first post, everything is fine, when there is only the wxPlotWindow in a separate frame.

The trouble starts, when there is anything else in the same frame as the wxPlotWindow. The problem might be connected somehow with the passing of the window options to wxPlotWindow, as there show no buttons at all when I only have the arguments like this:

wxSUNKEN_BORDER | wxPLOT_DEFAULT

In that case, at first, there is NO buton at all, but they appear on top of each other (which makes no sense of course) when I click with the mouse at their supposed locattion.

When I add discrete calls for the buttons, they show up directly (like:

wxPLOT_BUTTON_MOVE | wxPLOT_BUTTON_ENLARGE |  wxPLOT_BUTTON_ZOOM | )

Wo
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Wed 2024-4-17  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0