I am trying to create a notebook with tabs but have failed. What do I
need to do get the tabbed notebook to display properly? Thanks.
require 'rubygems'
require 'wx'
require 'ratio1.rb'
class MyApp < Wx::App
def on_init
@main_win = InputSubclass.new
@nbpLiquidity = Liquidity_sc.new
@nbpActivity = Activity_sc.new
@m_notebook = Wx::Notebook.new(@main_win, 1000)
@m_notebook.add_page(@nbpLiquidity, "test1")
@m_notebook.add_page(@nbpActivity, "test2")
@main_win.show
end #def
end # class
MyApp.new.main_loop
====================
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">
<object class="wxFrame" name="frmInput" subclass="InputSubclass">
<style>wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL</style>
<size>510,310</size>
<title>Data Entry</title>
</object>
<object class="wxFrame" name="frmLiquidity" subclass="Liquidity_sc">
<style>wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL</style>
<size>500,300</size>
<title>Liquidity Ratios</title>
</object>
<object class="wxFrame" name="frmActivity" subclass="Activity_sc">
<style>wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL</style>
<size>500,300</size>
<title>Activity Ratios</title>
</object>
<object class="wxFrame" name="frmLeverage" subclass="Leverage_sc">
<style>wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL</style>
<size>500,300</size>
<title>Leverage Ratios</title>
</object>
<object class="wxFrame" name="frmPerformance" subclass="Perf_sc">
<style>wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL</style>
<size>500,300</size>
<title>Performance Ratios</title>
</object>
<object class="wxFrame" name="frmValuation" subclass="Valuation_sc">
<style>wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL</style>
<size>500,300</size>
<title>Valuation Ratios</title>
</object>
</resource>
on 2010-03-17 05:24
on 2010-03-17 07:24
I am not an expert but I'll try to help according to my experiences, you can add a panel as page in notebook I don't know what object Liquiduty_sc is but if it is a panel then it should be ok
on 2010-03-17 07:41
hendra kusuma wrote: > I am not an expert but I'll try to help > > according to my experiences, you can add a panel as page in notebook > I don't know what object Liquiduty_sc is > but if it is a panel then it should be ok I got my code to work. Thanks for the help. Philip
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.