diff --git a/pcb_calculator/attenuators.cpp b/pcb_calculator/attenuators.cpp
index eb17803c35..4c0280e778 100644
--- a/pcb_calculator/attenuators.cpp
+++ b/pcb_calculator/attenuators.cpp
@@ -5,8 +5,8 @@
/*
* This program source code file is part of KICAD, a free EDA CAD application.
*
- * Copyright (C) 2011 jean-pierre.charras
- * Copyright (C) 2011 Kicad Developers, see change_log.txt for contributors.
+ * Copyright (C) 2015 jean-pierre.charras
+ * Copyright (C) 2015 Kicad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -46,7 +46,7 @@ void PCB_CALCULATOR_FRAME::SetAttenuator( unsigned aIdx )
aIdx = m_attenuator_list.size() - 1;
m_currAttenuator = m_attenuator_list[aIdx];
TransfAttenuatorDataToPanel();
- m_Attenuator_Messages->Clear();
+ m_Attenuator_Messages->SetPage( wxEmptyString );
m_Att_R1_Value->SetValue( wxEmptyString );
m_Att_R2_Value->SetValue( wxEmptyString );
m_Att_R3_Value->SetValue( wxEmptyString );
@@ -100,13 +100,17 @@ void PCB_CALCULATOR_FRAME::TransfAttenuatorResultsToPanel()
{
wxString msg;
- m_Attenuator_Messages->Clear();
+ m_Attenuator_Messages->SetPage( wxEmptyString );
if( m_currAttenuator->m_Error )
{
- msg.Printf( _( "Error!\nSet attenuation more than %f dB" ),
+ msg.Printf( _( "Attenuation more than %f dB" ),
m_currAttenuator->m_MinimumATT );
- m_Attenuator_Messages->AppendText( msg );
+ m_Attenuator_Messages->AppendToPage( wxT( "
Error!
" ) );
+ m_Attenuator_Messages->AppendToPage( msg );
+ m_Attenuator_Messages->AppendToPage( wxT( "" ) );
+
+ // Display -- as resistor values:
msg = wxT( "--" );
m_Att_R1_Value->SetValue( msg );
m_Att_R2_Value->SetValue( msg );
diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp
index d278530daf..e08d290d81 100644
--- a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp
+++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Mar 9 2015)
+// C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -247,7 +247,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
m_panelRegulators->SetSizer( bSizerMainReg );
m_panelRegulators->Layout();
bSizerMainReg->Fit( m_panelRegulators );
- m_Notebook->AddPage( m_panelRegulators, _("Regulators"), false );
+ m_Notebook->AddPage( m_panelRegulators, _("Regulators"), true );
m_panelTrackWidth = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizerTrackWidth;
bSizerTrackWidth = new wxBoxSizer( wxHORIZONTAL );
@@ -734,7 +734,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
fgSizerSubstPrms->Add( m_SubsPrm9_choiceUnit, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
- sbSubstrateBoxSizer->Add( fgSizerSubstPrms, 1, wxEXPAND, 5 );
+ sbSubstrateBoxSizer->Add( fgSizerSubstPrms, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
bMiddleSizer->Add( sbSubstrateBoxSizer, 0, wxEXPAND|wxBOTTOM, 5 );
@@ -762,7 +762,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
fgSizeCmpPrms->Add( m_choiceUnit_Frequency, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
- sbCmpPrmsSizer->Add( fgSizeCmpPrms, 0, wxEXPAND, 5 );
+ sbCmpPrmsSizer->Add( fgSizeCmpPrms, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
bMiddleSizer->Add( sbCmpPrmsSizer, 0, wxEXPAND|wxTOP, 5 );
@@ -834,7 +834,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
fgSizerPhysPrms->Add( 0, 0, 0, 0, 5 );
- sbRightBoxizer->Add( fgSizerPhysPrms, 0, wxEXPAND, 5 );
+ sbRightBoxizer->Add( fgSizerPhysPrms, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
btranslineRightSizer->Add( sbRightBoxizer, 0, wxBOTTOM|wxEXPAND, 5 );
@@ -915,10 +915,10 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
fgSizerResults->Add( m_choiceUnit_ElecPrm3, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
- sbElectricalResultsSizer->Add( fgSizerResults, 0, wxEXPAND, 5 );
+ sbElectricalResultsSizer->Add( fgSizerResults, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
- bRightSizer->Add( sbElectricalResultsSizer, 0, wxEXPAND, 5 );
+ bRightSizer->Add( sbElectricalResultsSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
wxStaticBoxSizer* sbMessagesSizer;
sbMessagesSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelTransline, wxID_ANY, _("Results:") ), wxVERTICAL );
@@ -998,7 +998,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
m_panelTransline->SetSizer( bSizeTransline );
m_panelTransline->Layout();
bSizeTransline->Fit( m_panelTransline );
- m_Notebook->AddPage( m_panelTransline, _("TransLine"), true );
+ m_Notebook->AddPage( m_panelTransline, _("TransLine"), false );
m_panelAttenuators = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxStaticBoxSizer* sbSizerAtt;
sbSizerAtt = new wxStaticBoxSizer( new wxStaticBox( m_panelAttenuators, wxID_ANY, _("label") ), wxHORIZONTAL );
@@ -1070,13 +1070,13 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
sbSizerAttPrms->Add( fgSizerAttPrms, 0, wxEXPAND, 5 );
- bMiddleSizerAtt->Add( sbSizerAttPrms, 0, wxEXPAND, 5 );
+ bMiddleSizerAtt->Add( sbSizerAttPrms, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
wxBoxSizer* bSizerAttButt;
bSizerAttButt = new wxBoxSizer( wxHORIZONTAL );
m_buttonAlcAtt = new wxButton( m_panelAttenuators, wxID_ANY, _("Calculate"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizerAttButt->Add( m_buttonAlcAtt, 0, wxALL, 5 );
+ bSizerAttButt->Add( m_buttonAlcAtt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_bitmapAnalyse1 = new wxStaticBitmap( m_panelAttenuators, wxID_ANY, wxBitmap( arrow_bottom_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
bSizerAttButt->Add( m_bitmapAnalyse1, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
@@ -1130,17 +1130,17 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
fgSizerAttResults->Add( m_attR3Unit, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
- sbSizerAttValues->Add( fgSizerAttResults, 0, wxEXPAND, 5 );
+ sbSizerAttValues->Add( fgSizerAttResults, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
- bMiddleSizerAtt->Add( sbSizerAttValues, 0, wxEXPAND, 5 );
+ bMiddleSizerAtt->Add( sbSizerAttValues, 0, wxEXPAND|wxTOP, 5 );
m_staticTextAttMsg = new wxStaticText( m_panelAttenuators, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextAttMsg->Wrap( -1 );
bMiddleSizerAtt->Add( m_staticTextAttMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- m_Attenuator_Messages = new wxTextCtrl( m_panelAttenuators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
- bMiddleSizerAtt->Add( m_Attenuator_Messages, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ m_Attenuator_Messages = new wxHtmlWindow( m_panelAttenuators, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_NO_SELECTION|wxHW_SCROLLBAR_AUTO|wxSUNKEN_BORDER );
+ bMiddleSizerAtt->Add( m_Attenuator_Messages, 1, wxALL|wxEXPAND, 5 );
sbSizerAtt->Add( bMiddleSizerAtt, 0, wxEXPAND, 5 );
@@ -1154,7 +1154,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
sbRightSizerFormula->Add( m_panelAttFormula, 1, wxALL|wxEXPAND, 5 );
- sbSizerAtt->Add( sbRightSizerFormula, 1, wxEXPAND, 5 );
+ sbSizerAtt->Add( sbRightSizerFormula, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
m_panelAttenuators->SetSizer( sbSizerAtt );
diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp
index a19832957a..39d0e425c7 100644
--- a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp
+++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp
@@ -44,7 +44,7 @@
PCB_CALCULATOR_FRAME_BASE
- 702,489
+ 753,485
wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER
KIWAY_PLAYER; kiway_player.h
PCB Calculator
@@ -270,7 +270,7 @@