Search found 62 matches

by pvn
Thu Aug 06, 2020 6:19 pm
Forum: C++ Development
Topic: assertion on notebook resizing in splitter
Replies: 7
Views: 138

Re: assertion on notebook resizing in splitter

Is there a minimal correct compilable code that can reproduce the issue with the splitter? I do not really understand what is in the first screenshot on the bottom. It looks as notebook tabs but without the pages and also the empty place right to the tabs should have a different color... that appli...
by pvn
Thu Aug 06, 2020 5:52 pm
Forum: C++ Development
Topic: assertion on notebook resizing in splitter
Replies: 7
Views: 138

Re: assertion on notebook resizing in splitter

The assert checking for 0-size bitmaps is new in wx 3.1.4, that's why it didn't happen before.
ok, but I'm using version 3.1.3
by pvn
Wed Aug 05, 2020 11:36 pm
Forum: C++ Development
Topic: assertion on notebook resizing in splitter
Replies: 7
Views: 138

Re: assertion on notebook resizing in splitter

solved

this is solved by setting

Code: Select all

 PanelAnalysisMatrix* panel_grid = new PanelAnalysisMatrix(m_splitter, table);
  panel_grid->SetMinSize(wxSize(-1, height_grid));  //needed for notebook assertion (invalid bitmap size)
still , it seems like a bug
by pvn
Wed Aug 05, 2020 11:19 pm
Forum: C++ Development
Topic: assertion on notebook resizing in splitter
Replies: 7
Views: 138

Re: assertion on notebook resizing in splitter

update the assertion seems to happen only when a second pane is added to main notebook pane (has a grid and a pane at bottom in image) void PanelReport::new_message_panel(wxNotebook* notebook, const wxString& title, const wxString& msg, status_color_t clr) { wxPanel* panel_message = new wxPanel(note...
by pvn
Wed Aug 05, 2020 10:46 pm
Forum: C++ Development
Topic: assertion on notebook resizing in splitter
Replies: 7
Views: 138

assertion on notebook resizing in splitter

for version 3.1.3, Windows 64 build I have a notebook inside a splitter made with m_splitter = new wxSplitterWindow(this); m_splitter->SetSashInvisible(false); wxNotebook* notebook = new wxNotebook(m_splitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_MULTILINE); PanelCurrent* panel_current =...
by pvn
Tue Aug 04, 2020 3:14 am
Forum: C++ Development
Topic: dynamic events for check boxes
Replies: 2
Views: 82

Re: dynamic events for check boxes

thank you I ended up doing something simpler on insertion wxWindowID ID = ID_LAST + 1; for (int idx = 0; idx < ts.LUT.size(); idx++) { wxCheckBox* cb = new wxCheckBox(panel, ID++, ts.LUT.at(idx).name); and on OK wxWindowID ID = ID_LAST + 1; for (int idx = 0; idx < ts.LUT.size(); idx++) { wxCheckBox*...
by pvn
Tue Aug 04, 2020 1:23 am
Forum: C++ Development
Topic: dynamic events for check boxes
Replies: 2
Views: 82

dynamic events for check boxes

I have a dialog that is filled with check boxes as in image the number of boxes varies each time, and I need to find on close which ones are checked normally this is done by finding the window by Id , like 'ID_CHECKBOX_1' in wxCheckBox* const cb = (wxCheckBox*)FindWindow(ID_CHECKBOX_1); if (cb->IsCh...
by pvn
Thu Jul 30, 2020 6:42 pm
Forum: C++ Development
Topic: check box in grid column
Replies: 12
Views: 237

Re: check box in grid column

ok, got it

Code: Select all

wxGrid* grid = new wxGrid(this, wxID_ANY);
  grid->CreateGrid(10, 3);
  grid->SetCellRenderer(3, 0, new wxGridCellBoolRenderer);
  grid->SetCellEditor(3, 0, new wxGridCellBoolEditor);
  grid->SetCellValue(3, 0, "1");
by pvn
Thu Jul 30, 2020 4:08 pm
Forum: C++ Development
Topic: check box in grid column
Replies: 12
Views: 237

Re: check box in grid column

the usage is like in the image: I want to add a check box to all the blue rows in the column;
I will give it a try to a custom renderer like in the grid demo
thanks
by pvn
Thu Jul 30, 2020 2:19 am
Forum: C++ Development
Topic: check box in grid column
Replies: 12
Views: 237

Re: check box in grid column

You can catch the appropriate event and then go thru all cells and check/uncheck the check box. I do catch a click event for the column void PanelCurrent::OnCellLeftClick(wxGridEvent& ev) { if (ev.GetCol() == underlying(cols_t::ActionTaken)) { but how to get access of the underlying control (the ch...
by pvn
Thu Jul 30, 2020 1:38 am
Forum: C++ Development
Topic: check box in grid column
Replies: 12
Views: 237

Re: check box in grid column

I was having grid->EnableEditing(false); setting to true fixes it grid->EnableEditing(true); related to this, I want to have the behavior of 1) also having text in the same cell 2) when I click one check box, all the other check boxes that have the *same* string also get selected would this be possi...
by pvn
Thu Jul 30, 2020 1:22 am
Forum: C++ Development
Topic: check box in grid column
Replies: 12
Views: 237

Re: check box in grid column

windows 10, wxwidgets-3.1.3, 64bit build
yes, grid demo shows the check box fine (checked, not checked on click)
by pvn
Wed Jul 29, 2020 11:22 pm
Forum: C++ Development
Topic: check box in grid column
Replies: 12
Views: 237

check box in grid column

I have a grid, and trying to have one column have a check box for all rows with wxGridCellAttr* attr; wxColour clr(51, 172, 255); attr = new wxGridCellAttr(); attr->SetReadOnly(false); attr->SetBackgroundColour(clr); if (1) attr->SetEditor(new wxGridCellBoolEditor()); if (1) attr->SetRenderer(new wx...
by pvn
Wed Jul 08, 2020 9:40 pm
Forum: C++ Development
Topic: wxTimeSpan
Replies: 3
Views: 116

Re: wxTimeSpan

It would be three days if your second date would be 2020-03-29T23:59:59. But since the time is 00:00:00, the 29th day is 'about to' begin...
yes , that tricked me .... thanks for all the replies :)
by pvn
Wed Jul 08, 2020 4:44 pm
Forum: C++ Development
Topic: wxTimeSpan
Replies: 3
Views: 116

wxTimeSpan

I have this code wxTimeSpan time_span = date_end.Subtract(date_start); int hours = time_span.GetHours(); int days = time_span.GetDays(); wxLogDebug("%s, date_before=%s, StartTime>=%s AND StartTime <=%s", AnalysisType, date_before.FormatISOCombined(), date_start.FormatISOCombined(), date_end.FormatIS...