Develop and Download Open Source Software

Browse CVS Repository

Contents of /exerb/exerbtk/test/form_border_style.rb

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download)
Fri Feb 13 17:17:20 2004 UTC (20 years, 1 month ago) by yuya
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +9 -17 lines
* Etk::Object#setを使用するように変更

1 #! /usr/bin/ruby
2
3 #==============================================================================#
4 # $Id: form_border_style.rb,v 1.3 2004/02/13 16:35:31 yuya Exp $
5 #==============================================================================#
6
7 require 'etk/etk'
8
9 #==============================================================================#
10
11 class MyForm < Etk::Form
12
13 def initialize
14 self.suspend_layout {
15 self.text = '$Id: form_border_style.rb,v 1.3 2004/02/13 16:35:31 yuya Exp $'
16 self.set_client_size(170, 230)
17 self << Etk::Panel.new(:panel, '', 10, 10, 150, 210).with { |panel|
18 panel.anchor = Etk::Control::ANCHOR_ALL
19 panel.suspend_layout {
20 panel << Etk::Button.new(:btn1, 'NONE', 0, 0, 150, 30).set(:anchor => Etk::Control::ANCHOR_LEFT_AND_RIGHT)
21 panel << Etk::Button.new(:btn2, 'FIXED_3D', 0, 30, 150, 30).set(:anchor => Etk::Control::ANCHOR_LEFT_AND_RIGHT)
22 panel << Etk::Button.new(:btn3, 'FIXED_DIALOG', 0, 60, 150, 30).set(:anchor => Etk::Control::ANCHOR_LEFT_AND_RIGHT)
23 panel << Etk::Button.new(:btn4, 'FIXED_SINGLE', 0, 90, 150, 30).set(:anchor => Etk::Control::ANCHOR_LEFT_AND_RIGHT)
24 panel << Etk::Button.new(:btn5, 'SIZABLE', 0, 120, 150, 30).set(:anchor => Etk::Control::ANCHOR_LEFT_AND_RIGHT)
25 panel << Etk::Button.new(:btn6, 'FIXED_TOOL_WINDOW', 0, 150, 150, 30).set(:anchor => Etk::Control::ANCHOR_LEFT_AND_RIGHT)
26 panel << Etk::Button.new(:btn7, 'SIZABLE_TOOL_WINDOW', 0, 180, 150, 30).set(:anchor => Etk::Control::ANCHOR_LEFT_AND_RIGHT)
27 }
28 }
29 }
30 end
31
32 def on_panel_btn1_click(arg)
33 self.border_style = Etk::Form::BORDER_STYLE_NONE
34 end
35
36 def on_panel_btn2_click(arg)
37 self.border_style = Etk::Form::BORDER_STYLE_FIXED_3D
38 end
39
40 def on_panel_btn3_click(arg)
41 self.border_style = Etk::Form::BORDER_STYLE_FIXED_DIALOG
42 end
43
44 def on_panel_btn4_click(arg)
45 self.border_style = Etk::Form::BORDER_STYLE_FIXED_SINGLE
46 end
47
48 def on_panel_btn5_click(arg)
49 self.border_style = Etk::Form::BORDER_STYLE_SIZABLE
50 end
51
52 def on_panel_btn6_click(arg)
53 self.border_style = Etk::Form::BORDER_STYLE_FIXED_TOOL_WINDOW
54 end
55
56 def on_panel_btn7_click(arg)
57 self.border_style = Etk::Form::BORDER_STYLE_SIZABLE_TOOL_WINDOW
58 end
59
60 end
61
62 #==============================================================================#
63
64 Etk.main(MyForm.new)
65
66 #==============================================================================#
67 #==============================================================================#

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26