Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mcorino committed Oct 15, 2023
2 parents caaaacb + 49aa488 commit 249836c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
20 changes: 10 additions & 10 deletions samples/controls/controls.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,20 +320,20 @@ def initialize(frame,x,y,w,h)
@m_notebook.add_page(panel, "RadioBox", false, Image_Radio)

panel = Panel.new(@m_notebook)
box = StaticBox.new( panel, -1, "&Gauge and Slider", Point.new(10,10), Size.new(222,130) )
@m_gauge = Gauge.new( box, -1, 200, Point.new(8,40), Size.new(155, 30), GA_HORIZONTAL|NO_BORDER )
box = StaticBox.new( panel, -1, "&Gauge and Slider", Point.new(10,10), Size.new(240,170) )
@m_gauge = Gauge.new( box, -1, 200, Point.new(10,30), Size.new(155, 30), GA_HORIZONTAL|NO_BORDER )
@m_gauge.set_background_colour(GREEN)
@m_gauge.set_foreground_colour(RED)
@m_gaugeVert = Gauge.new( box, -1, 100,
Point.new(185,25), Size.new(30, 90),
GA_VERTICAL | GA_SMOOTH | NO_BORDER )
@m_slider = Slider.new( box, ID_SLIDER, 0, 0, 200, Point.new(8,80), Size.new(155,-1),
@m_slider = Slider.new( box, ID_SLIDER, 0, 0, 200, Point.new(10,70), Size.new(155,-1),
SL_AUTOTICKS | SL_LABELS )
@m_slider.set_tick_freq(40) unless Wx::PLATFORM == 'WXOSX'
@m_slider.set_tool_tip("This is a sliding slider")

box = StaticBox.new(panel, -1, "&Explanation",
Point.new(230,10), Size.new(270,130),
Point.new(250,10), Size.new(310,170),
ALIGN_CENTER )

StaticText.new( box, -1,
Expand All @@ -343,20 +343,20 @@ def initialize(frame,x,y,w,h)
"\n"+
"This is also supposed to demonstrate how\n"+
"to use static controls.\n",
Point.new(20,15),
Point.new(10,10),
DEFAULT_SIZE)
#Size.new(240, 110))
initialSpinValue = -5
s = initialSpinValue.to_s
@m_spintext = TextCtrl.new( panel, -1, s, Point.new(20,160), Size.new(80,-1) )
@m_spinbutton = SpinButton.new( panel, ID_SPIN, Point.new(103,160), Size.new(80, @m_spintext.size.height) )
@m_spintext = TextCtrl.new( panel, -1, s, Point.new(20,195), Size.new(80,-1) )
@m_spinbutton = SpinButton.new( panel, ID_SPIN, Point.new(103,195), Size.new(80, @m_spintext.size.height) )
@m_spinbutton.set_range(-40,30)
@m_spinbutton.set_value(initialSpinValue)

@m_btnProgress = Button.new( panel, ID_BTNPROGRESS, "&Show progress dialog",
Point.new(300, 160) )
Point.new(300, 195) )

@m_spinctrl = SpinCtrl.new( panel, ID_SPINCTRL, "", Point.new(200, 160), Size.new(95, @m_spintext.size.height) )
@m_spinctrl = SpinCtrl.new( panel, ID_SPINCTRL, "", Point.new(200, 195), Size.new(95, @m_spintext.size.height) )
@m_spinctrl.set_range(10,30)
@m_spinctrl.set_value(15)

Expand Down Expand Up @@ -923,7 +923,7 @@ def onSizerCheck(event)

class MyFrame < Frame
def initialize(title,x,y)
super(nil, -1, title, Point.new(x, y), Size.new(500, 430))
super(nil, -1, title, Point.new(x, y), Size.new(600, 500))

@s_delay = 5000
@s_enabled = true
Expand Down
10 changes: 6 additions & 4 deletions samples/text/textctrl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ def construct_menus

def on_click
@log.value = @textctrl.report
if @textctrl.get_proof_check_options.is_spell_check_enabled
@textctrl.enable_proof_check(Wx::TextProofOptions.disable)
else
@textctrl.enable_proof_check(Wx::TextProofOptions.default)
if Wx.has_feature?(:USE_SPELLCHECK)
if @textctrl.get_proof_check_options.is_spell_check_enabled
@textctrl.enable_proof_check(Wx::TextProofOptions.disable)
else
@textctrl.enable_proof_check(Wx::TextProofOptions.default)
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion samples/text/unicode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def self.describe
def self.activate
frame = IConvFrame.new("Unicode demonstration - ",
Wx::Point.new(50, 50),
Wx::Size.new(450, 450) )
Wx::Size.new(450, 600) )

frame.show(true)
frame
Expand Down

0 comments on commit 249836c

Please sign in to comment.