SlideShare a Scribd company logo
1 of 10
Download to read offline
Ring Documentation, Release 1.8
ā€¢ The User Can click on the button many times to open many sub windows.
ā€¢ Each Sub Window contains Two buttons.
ā€¢ The ļ¬rst button in the sub window change the Main and the Sub Windows Titles.
ā€¢ The second button in the sub window close the Sub Window.
load "guilib.ring"
new qApp {
open_window( :MainWindowController )
exec()
}
class MainWindowController from WindowsControllerParent
oView = new MainWindowView
func SubWindowAction
Open_window( :SubWindowController )
Last_Window().SetParentObject(self)
class MainWindowView from WindowsViewParent
win = new qWidget() {
SetWindowTitle("Main Window")
btnSub = new qPushButton(win) {
setText("Sub Window")
setClickEvent( Method( :SubWindowAction ) )
}
resize(400,400)
}
class SubWindowController from WindowsControllerParent
oView = new SubWindowView
func SetMainWindowTitleAction
Parent().oView.win.SetWindowTitle("Message from the Sub Window")
oView.win.SetWindowTitle("Click Event Done!")
class SubWindowView from WindowsViewParent
win = new qWidget() {
SetWindowTitle("Sub Window")
btnMsg = new qPushButton(win) {
setText("Set Main Window Title")
setClickEvent( Method( :SetMainWindowTitleAction ) )
}
btnClose = new qPushButton(win) {
Move(200,0)
setText("Close")
setClickEvent( Method( :CloseAction ) )
}
resize(400,400)
}
The next screen shot after creating three sub windows.
62.2. Example 741
Ring Documentation, Release 1.8
The next screen shot after clicking on the button in each sub window.
62.2. Example 742
Ring Documentation, Release 1.8
62.3 Open_WindowAndLink() Function
We can use the Open_WindowAndLink() function to connect between the application windows, pass messages (call
methods) between the objects.
This function uses Meta-programming to deļ¬ne dynamic methods in the Caller Class to use the dynamic objects of
other windows that we create.
Example : (Uses the Form Designer)
First Window
1. https://github.com/ring-lang/ring/blob/master/applications/formdesigner/tests/twowindowspart5/ļ¬rstwindowView.ring
2. https://github.com/ring-lang/ring/blob/master/applications/formdesigner/tests/twowindowspart5/ļ¬rstwindowController.ring
Second Window
1. https://github.com/ring-lang/ring/blob/master/applications/formdesigner/tests/twowindowspart5/secondwindowView.ring
2. https://github.com/ring-lang/ring/blob/master/applications/formdesigner/tests/twowindowspart5/secondwindowController.ring
62.3. Open_WindowAndLink() Function 743
Ring Documentation, Release 1.8
In the next code for example (from FirstWindowController.ring)
The Open_WindowAndLink() will create an object from the SecondWindowController Class
Then will add the Method : SecondWindow(), IsSecondWindow() Methods to the FirstWindowController Class
Also will add the Method : FirstWindow(), IsFirstWindow() Methods to the SecondWindowController Class
So the SendMessage() method in FirstWindowController class can use the SecondWindow() method to access the
object.
This is more simple than using Last_Window(), Parent() and SetParentObject() methods.
class firstwindowController from windowsControllerParent
oView = new firstwindowView
func OpenSecondWindow
Open_WindowAndLink(:SecondWindowController,self)
func SendMessage
if IsSecondWindow()
SecondWindow().setMessage("Message from the first window")
ok
func setMessage cMessage
oView.Label1.setText(cMessage)
62.4 Open_WindowInPackages() Function
The Open_WindowInPackages() function is the same as Open_Window() but takes an extra list that determine the
packages to import before opening the window.
Syntax:
Open_WindowInPackages(cClassName,aPackagesList)
Example:
The next example from the Form Designer source code, Open the Window Flags window using the
open_windowInPackages() function.
We determine the class name ā€œWindowFlagsControllerā€ and the packages name.
The Window Flags window uses the FormDesigner and System.GUI packages.
open_windowInPackages(:WindowFlagsController,[
"formdesigner",
"System.GUI"
])
62.5 Objects Library Source Code
The library source code is very simple, You can check the source code ļ¬les
ā€¢ https://github.com/ring-lang/ring/blob/master/extensions/ringqt/objectslib/objects.ring
ā€¢ https://github.com/ring-lang/ring/blob/master/extensions/ringqt/objectslib/subwindows.ring
62.4. Open_WindowInPackages() Function 744
CHAPTER
SIXTYTHREE
USING THE FORM DESIGNER
In this chapter we will learn about using the Form Designer.
We can run the From Designer from Ring Notepad
From the Menubar in Ring Notepad - View Menu - We can Show/Hide the Form Designer window.
Also we can run the Form Designer in another window.
From the Ring Notepad - Tools Menu - Select the Form Designer.
745
Ring Documentation, Release 1.8
63.1 The Designer Windows
ā€¢ Toolbox : To select controls to be added to the window.
ā€¢ Properties : To set the properties of the active window or controls.
ā€¢ Design Region : To select, move and resize the window and the controls.
63.2 The Toolbox
We have many buttons.
ā€¢ Lock : We can use it to draw many controls of the same type quickly.
ā€¢ Select : We can use it to select a control in the Design Region
ā€¢ Controls Buttons : Select a control to be added to the window.
63.3 The Properties
ā€¢ When we select the window or one control, We will have the selected object properties.
ā€¢ Also In the properties window we have a combobox to select the active control.
ā€¢ Some properties provide a button next to the property value. We can click on the button to get more options.
ā€¢ When we select more than one control, We will have options for multi-selection
63.1. The Designer Windows 746
Ring Documentation, Release 1.8
63.4 Running Forms
When we save the form ļ¬le (*.rform), The Form Designer will create two Ring ļ¬les
ā€¢ The Controller Class
ā€¢ The View Class
For example, if the form ļ¬le is helloworld.rform
The form designer will generate two ļ¬les
ā€¢ helloworldcontroller.ring
ā€¢ helloworldview.ring
To run the program, Open the controller class ļ¬le then click the Run button (CTRL+F5)
Tip: When you open a form using Ring Notepad, the controller class will be opened automatically, So we can press
(CTRL+F5) or click on the Run button while the form designer window is active.
63.5 Events Code
1. Just type the method name in the event property.
63.4. Running Forms 747
Ring Documentation, Release 1.8
(2) Then write the method code in the controller class.
63.5. Events Code 748
Ring Documentation, Release 1.8
In this example we write
func CloseWindow
oView.win.close()
Where inside the controller class, We uses the oView object to access the form.
Another Example :
63.5. Events Code 749
Ring Documentation, Release 1.8
The Event Code
func SayHello
oView {
LineEdit2.setText("Hello "+ LineEdit1.text() )
}
63.6 Keyboard Shortcuts
After selecting one or group of controls
ā€¢ Use the Arrows (Up, Down, Left and Right) to move them around.
ā€¢ Shift + the Arrows (Up, Down, Left and Right) to Resize the controls.
ā€¢ Del button to delete the controls.
ā€¢ CTRL+SHIFT+V to Duplicate the controls.
63.7 Menubar Designer
From the Window properties we can open the Menubar Designer
63.6. Keyboard Shortcuts 750

More Related Content

What's hot

iOS Automation: XCUITest + Gherkin
iOS Automation: XCUITest + GherkiniOS Automation: XCUITest + Gherkin
iOS Automation: XCUITest + GherkinKenneth Poon
Ā 
Programming Without Coding Technology (PWCT) - ShellExplorer Sample
Programming Without Coding Technology (PWCT) - ShellExplorer SampleProgramming Without Coding Technology (PWCT) - ShellExplorer Sample
Programming Without Coding Technology (PWCT) - ShellExplorer SampleMahmoud Samir Fayed
Ā 
Events and Listeners in Android
Events and Listeners in AndroidEvents and Listeners in Android
Events and Listeners in Androidma-polimi
Ā 
Java Virtual Keyboard Using Robot, Toolkit and JToggleButton Classes
Java Virtual Keyboard Using Robot, Toolkit and JToggleButton ClassesJava Virtual Keyboard Using Robot, Toolkit and JToggleButton Classes
Java Virtual Keyboard Using Robot, Toolkit and JToggleButton ClassesAbdul Rahman Sherzad
Ā 
iOS Contact List Application Tutorial
iOS Contact List Application TutorialiOS Contact List Application Tutorial
iOS Contact List Application TutorialIshara Amarasekera
Ā 
Windows 8 Pure Imagination - 2012-11-25 - Extending Your Game with Windows 8 ...
Windows 8 Pure Imagination - 2012-11-25 - Extending Your Game with Windows 8 ...Windows 8 Pure Imagination - 2012-11-25 - Extending Your Game with Windows 8 ...
Windows 8 Pure Imagination - 2012-11-25 - Extending Your Game with Windows 8 ...FrƩdƩric Harper
Ā 
Swtbot
SwtbotSwtbot
Swtbotcristitep
Ā 
Practical JavaScript Programming - Session 8/8
Practical JavaScript Programming - Session 8/8Practical JavaScript Programming - Session 8/8
Practical JavaScript Programming - Session 8/8Wilson Su
Ā 
Programming Without Coding Technology (PWCT) - Internet Explorer ActiveX Control
Programming Without Coding Technology (PWCT) - Internet Explorer ActiveX ControlProgramming Without Coding Technology (PWCT) - Internet Explorer ActiveX Control
Programming Without Coding Technology (PWCT) - Internet Explorer ActiveX ControlMahmoud Samir Fayed
Ā 

What's hot (9)

iOS Automation: XCUITest + Gherkin
iOS Automation: XCUITest + GherkiniOS Automation: XCUITest + Gherkin
iOS Automation: XCUITest + Gherkin
Ā 
Programming Without Coding Technology (PWCT) - ShellExplorer Sample
Programming Without Coding Technology (PWCT) - ShellExplorer SampleProgramming Without Coding Technology (PWCT) - ShellExplorer Sample
Programming Without Coding Technology (PWCT) - ShellExplorer Sample
Ā 
Events and Listeners in Android
Events and Listeners in AndroidEvents and Listeners in Android
Events and Listeners in Android
Ā 
Java Virtual Keyboard Using Robot, Toolkit and JToggleButton Classes
Java Virtual Keyboard Using Robot, Toolkit and JToggleButton ClassesJava Virtual Keyboard Using Robot, Toolkit and JToggleButton Classes
Java Virtual Keyboard Using Robot, Toolkit and JToggleButton Classes
Ā 
iOS Contact List Application Tutorial
iOS Contact List Application TutorialiOS Contact List Application Tutorial
iOS Contact List Application Tutorial
Ā 
Windows 8 Pure Imagination - 2012-11-25 - Extending Your Game with Windows 8 ...
Windows 8 Pure Imagination - 2012-11-25 - Extending Your Game with Windows 8 ...Windows 8 Pure Imagination - 2012-11-25 - Extending Your Game with Windows 8 ...
Windows 8 Pure Imagination - 2012-11-25 - Extending Your Game with Windows 8 ...
Ā 
Swtbot
SwtbotSwtbot
Swtbot
Ā 
Practical JavaScript Programming - Session 8/8
Practical JavaScript Programming - Session 8/8Practical JavaScript Programming - Session 8/8
Practical JavaScript Programming - Session 8/8
Ā 
Programming Without Coding Technology (PWCT) - Internet Explorer ActiveX Control
Programming Without Coding Technology (PWCT) - Internet Explorer ActiveX ControlProgramming Without Coding Technology (PWCT) - Internet Explorer ActiveX Control
Programming Without Coding Technology (PWCT) - Internet Explorer ActiveX Control
Ā 

Similar to The Ring programming language version 1.8 book - Part 78 of 202

The Ring programming language version 1.3 book - Part 54 of 88
The Ring programming language version 1.3 book - Part 54 of 88The Ring programming language version 1.3 book - Part 54 of 88
The Ring programming language version 1.3 book - Part 54 of 88Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.5.2 book - Part 68 of 181
The Ring programming language version 1.5.2 book - Part 68 of 181The Ring programming language version 1.5.2 book - Part 68 of 181
The Ring programming language version 1.5.2 book - Part 68 of 181Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.6 book - Part 74 of 189
The Ring programming language version 1.6 book - Part 74 of 189The Ring programming language version 1.6 book - Part 74 of 189
The Ring programming language version 1.6 book - Part 74 of 189Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.5.3 book - Part 81 of 184
The Ring programming language version 1.5.3 book - Part 81 of 184The Ring programming language version 1.5.3 book - Part 81 of 184
The Ring programming language version 1.5.3 book - Part 81 of 184Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 84 of 212
The Ring programming language version 1.10 book - Part 84 of 212The Ring programming language version 1.10 book - Part 84 of 212
The Ring programming language version 1.10 book - Part 84 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.2 book - Part 51 of 84
The Ring programming language version 1.2 book - Part 51 of 84The Ring programming language version 1.2 book - Part 51 of 84
The Ring programming language version 1.2 book - Part 51 of 84Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 72 of 212
The Ring programming language version 1.10 book - Part 72 of 212The Ring programming language version 1.10 book - Part 72 of 212
The Ring programming language version 1.10 book - Part 72 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.5.1 book - Part 68 of 180
The Ring programming language version 1.5.1 book - Part 68 of 180The Ring programming language version 1.5.1 book - Part 68 of 180
The Ring programming language version 1.5.1 book - Part 68 of 180Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.3 book - Part 7 of 88
The Ring programming language version 1.3 book - Part 7 of 88The Ring programming language version 1.3 book - Part 7 of 88
The Ring programming language version 1.3 book - Part 7 of 88Mahmoud Samir Fayed
Ā 
Oracle 10g Forms Lesson 15
Oracle 10g Forms Lesson  15Oracle 10g Forms Lesson  15
Oracle 10g Forms Lesson 15KAMA3
Ā 
Programming Without Coding Technology (PWCT) - Richeditbox control
Programming Without Coding Technology (PWCT) - Richeditbox controlProgramming Without Coding Technology (PWCT) - Richeditbox control
Programming Without Coding Technology (PWCT) - Richeditbox controlMahmoud Samir Fayed
Ā 
Programming Without Coding Technology (PWCT) - Checkbox control
Programming Without Coding Technology (PWCT) - Checkbox controlProgramming Without Coding Technology (PWCT) - Checkbox control
Programming Without Coding Technology (PWCT) - Checkbox controlMahmoud Samir Fayed
Ā 
Programming Without Coding Technology (PWCT) - Slider control
Programming Without Coding Technology (PWCT) - Slider controlProgramming Without Coding Technology (PWCT) - Slider control
Programming Without Coding Technology (PWCT) - Slider controlMahmoud Samir Fayed
Ā 
Programming Without Coding Technology (PWCT) - Editbox control
Programming Without Coding Technology (PWCT) - Editbox controlProgramming Without Coding Technology (PWCT) - Editbox control
Programming Without Coding Technology (PWCT) - Editbox controlMahmoud Samir Fayed
Ā 
Programming Without Coding Technology (PWCT) - Grid control
Programming Without Coding Technology (PWCT) - Grid controlProgramming Without Coding Technology (PWCT) - Grid control
Programming Without Coding Technology (PWCT) - Grid controlMahmoud Samir Fayed
Ā 
Programming Without Coding Technology (PWCT) - Checkbutton control
Programming Without Coding Technology (PWCT) - Checkbutton controlProgramming Without Coding Technology (PWCT) - Checkbutton control
Programming Without Coding Technology (PWCT) - Checkbutton controlMahmoud Samir Fayed
Ā 
Programming Without Coding Technology (PWCT) - Spinner control
Programming Without Coding Technology (PWCT) - Spinner controlProgramming Without Coding Technology (PWCT) - Spinner control
Programming Without Coding Technology (PWCT) - Spinner controlMahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 20 of 212
The Ring programming language version 1.10 book - Part 20 of 212The Ring programming language version 1.10 book - Part 20 of 212
The Ring programming language version 1.10 book - Part 20 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.6 book - Part 14 of 189
The Ring programming language version 1.6 book - Part 14 of 189The Ring programming language version 1.6 book - Part 14 of 189
The Ring programming language version 1.6 book - Part 14 of 189Mahmoud Samir Fayed
Ā 

Similar to The Ring programming language version 1.8 book - Part 78 of 202 (20)

The Ring programming language version 1.3 book - Part 54 of 88
The Ring programming language version 1.3 book - Part 54 of 88The Ring programming language version 1.3 book - Part 54 of 88
The Ring programming language version 1.3 book - Part 54 of 88
Ā 
The Ring programming language version 1.5.2 book - Part 68 of 181
The Ring programming language version 1.5.2 book - Part 68 of 181The Ring programming language version 1.5.2 book - Part 68 of 181
The Ring programming language version 1.5.2 book - Part 68 of 181
Ā 
The Ring programming language version 1.6 book - Part 74 of 189
The Ring programming language version 1.6 book - Part 74 of 189The Ring programming language version 1.6 book - Part 74 of 189
The Ring programming language version 1.6 book - Part 74 of 189
Ā 
The Ring programming language version 1.5.3 book - Part 81 of 184
The Ring programming language version 1.5.3 book - Part 81 of 184The Ring programming language version 1.5.3 book - Part 81 of 184
The Ring programming language version 1.5.3 book - Part 81 of 184
Ā 
The Ring programming language version 1.10 book - Part 84 of 212
The Ring programming language version 1.10 book - Part 84 of 212The Ring programming language version 1.10 book - Part 84 of 212
The Ring programming language version 1.10 book - Part 84 of 212
Ā 
The Ring programming language version 1.2 book - Part 51 of 84
The Ring programming language version 1.2 book - Part 51 of 84The Ring programming language version 1.2 book - Part 51 of 84
The Ring programming language version 1.2 book - Part 51 of 84
Ā 
The Ring programming language version 1.10 book - Part 72 of 212
The Ring programming language version 1.10 book - Part 72 of 212The Ring programming language version 1.10 book - Part 72 of 212
The Ring programming language version 1.10 book - Part 72 of 212
Ā 
The Ring programming language version 1.5.1 book - Part 68 of 180
The Ring programming language version 1.5.1 book - Part 68 of 180The Ring programming language version 1.5.1 book - Part 68 of 180
The Ring programming language version 1.5.1 book - Part 68 of 180
Ā 
The Ring programming language version 1.3 book - Part 7 of 88
The Ring programming language version 1.3 book - Part 7 of 88The Ring programming language version 1.3 book - Part 7 of 88
The Ring programming language version 1.3 book - Part 7 of 88
Ā 
Les14
Les14Les14
Les14
Ā 
Oracle 10g Forms Lesson 15
Oracle 10g Forms Lesson  15Oracle 10g Forms Lesson  15
Oracle 10g Forms Lesson 15
Ā 
Programming Without Coding Technology (PWCT) - Richeditbox control
Programming Without Coding Technology (PWCT) - Richeditbox controlProgramming Without Coding Technology (PWCT) - Richeditbox control
Programming Without Coding Technology (PWCT) - Richeditbox control
Ā 
Programming Without Coding Technology (PWCT) - Checkbox control
Programming Without Coding Technology (PWCT) - Checkbox controlProgramming Without Coding Technology (PWCT) - Checkbox control
Programming Without Coding Technology (PWCT) - Checkbox control
Ā 
Programming Without Coding Technology (PWCT) - Slider control
Programming Without Coding Technology (PWCT) - Slider controlProgramming Without Coding Technology (PWCT) - Slider control
Programming Without Coding Technology (PWCT) - Slider control
Ā 
Programming Without Coding Technology (PWCT) - Editbox control
Programming Without Coding Technology (PWCT) - Editbox controlProgramming Without Coding Technology (PWCT) - Editbox control
Programming Without Coding Technology (PWCT) - Editbox control
Ā 
Programming Without Coding Technology (PWCT) - Grid control
Programming Without Coding Technology (PWCT) - Grid controlProgramming Without Coding Technology (PWCT) - Grid control
Programming Without Coding Technology (PWCT) - Grid control
Ā 
Programming Without Coding Technology (PWCT) - Checkbutton control
Programming Without Coding Technology (PWCT) - Checkbutton controlProgramming Without Coding Technology (PWCT) - Checkbutton control
Programming Without Coding Technology (PWCT) - Checkbutton control
Ā 
Programming Without Coding Technology (PWCT) - Spinner control
Programming Without Coding Technology (PWCT) - Spinner controlProgramming Without Coding Technology (PWCT) - Spinner control
Programming Without Coding Technology (PWCT) - Spinner control
Ā 
The Ring programming language version 1.10 book - Part 20 of 212
The Ring programming language version 1.10 book - Part 20 of 212The Ring programming language version 1.10 book - Part 20 of 212
The Ring programming language version 1.10 book - Part 20 of 212
Ā 
The Ring programming language version 1.6 book - Part 14 of 189
The Ring programming language version 1.6 book - Part 14 of 189The Ring programming language version 1.6 book - Part 14 of 189
The Ring programming language version 1.6 book - Part 14 of 189
Ā 

More from Mahmoud Samir Fayed

The Ring programming language version 1.10 book - Part 212 of 212
The Ring programming language version 1.10 book - Part 212 of 212The Ring programming language version 1.10 book - Part 212 of 212
The Ring programming language version 1.10 book - Part 212 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 211 of 212
The Ring programming language version 1.10 book - Part 211 of 212The Ring programming language version 1.10 book - Part 211 of 212
The Ring programming language version 1.10 book - Part 211 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 210 of 212
The Ring programming language version 1.10 book - Part 210 of 212The Ring programming language version 1.10 book - Part 210 of 212
The Ring programming language version 1.10 book - Part 210 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 208 of 212
The Ring programming language version 1.10 book - Part 208 of 212The Ring programming language version 1.10 book - Part 208 of 212
The Ring programming language version 1.10 book - Part 208 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 207 of 212
The Ring programming language version 1.10 book - Part 207 of 212The Ring programming language version 1.10 book - Part 207 of 212
The Ring programming language version 1.10 book - Part 207 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 205 of 212
The Ring programming language version 1.10 book - Part 205 of 212The Ring programming language version 1.10 book - Part 205 of 212
The Ring programming language version 1.10 book - Part 205 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 206 of 212
The Ring programming language version 1.10 book - Part 206 of 212The Ring programming language version 1.10 book - Part 206 of 212
The Ring programming language version 1.10 book - Part 206 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 204 of 212
The Ring programming language version 1.10 book - Part 204 of 212The Ring programming language version 1.10 book - Part 204 of 212
The Ring programming language version 1.10 book - Part 204 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 203 of 212
The Ring programming language version 1.10 book - Part 203 of 212The Ring programming language version 1.10 book - Part 203 of 212
The Ring programming language version 1.10 book - Part 203 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 202 of 212
The Ring programming language version 1.10 book - Part 202 of 212The Ring programming language version 1.10 book - Part 202 of 212
The Ring programming language version 1.10 book - Part 202 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 201 of 212
The Ring programming language version 1.10 book - Part 201 of 212The Ring programming language version 1.10 book - Part 201 of 212
The Ring programming language version 1.10 book - Part 201 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 200 of 212
The Ring programming language version 1.10 book - Part 200 of 212The Ring programming language version 1.10 book - Part 200 of 212
The Ring programming language version 1.10 book - Part 200 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 199 of 212
The Ring programming language version 1.10 book - Part 199 of 212The Ring programming language version 1.10 book - Part 199 of 212
The Ring programming language version 1.10 book - Part 199 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 198 of 212
The Ring programming language version 1.10 book - Part 198 of 212The Ring programming language version 1.10 book - Part 198 of 212
The Ring programming language version 1.10 book - Part 198 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 197 of 212
The Ring programming language version 1.10 book - Part 197 of 212The Ring programming language version 1.10 book - Part 197 of 212
The Ring programming language version 1.10 book - Part 197 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 196 of 212
The Ring programming language version 1.10 book - Part 196 of 212The Ring programming language version 1.10 book - Part 196 of 212
The Ring programming language version 1.10 book - Part 196 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 195 of 212
The Ring programming language version 1.10 book - Part 195 of 212The Ring programming language version 1.10 book - Part 195 of 212
The Ring programming language version 1.10 book - Part 195 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 194 of 212
The Ring programming language version 1.10 book - Part 194 of 212The Ring programming language version 1.10 book - Part 194 of 212
The Ring programming language version 1.10 book - Part 194 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 193 of 212
The Ring programming language version 1.10 book - Part 193 of 212The Ring programming language version 1.10 book - Part 193 of 212
The Ring programming language version 1.10 book - Part 193 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.10 book - Part 192 of 212
The Ring programming language version 1.10 book - Part 192 of 212The Ring programming language version 1.10 book - Part 192 of 212
The Ring programming language version 1.10 book - Part 192 of 212Mahmoud Samir Fayed
Ā 

More from Mahmoud Samir Fayed (20)

The Ring programming language version 1.10 book - Part 212 of 212
The Ring programming language version 1.10 book - Part 212 of 212The Ring programming language version 1.10 book - Part 212 of 212
The Ring programming language version 1.10 book - Part 212 of 212
Ā 
The Ring programming language version 1.10 book - Part 211 of 212
The Ring programming language version 1.10 book - Part 211 of 212The Ring programming language version 1.10 book - Part 211 of 212
The Ring programming language version 1.10 book - Part 211 of 212
Ā 
The Ring programming language version 1.10 book - Part 210 of 212
The Ring programming language version 1.10 book - Part 210 of 212The Ring programming language version 1.10 book - Part 210 of 212
The Ring programming language version 1.10 book - Part 210 of 212
Ā 
The Ring programming language version 1.10 book - Part 208 of 212
The Ring programming language version 1.10 book - Part 208 of 212The Ring programming language version 1.10 book - Part 208 of 212
The Ring programming language version 1.10 book - Part 208 of 212
Ā 
The Ring programming language version 1.10 book - Part 207 of 212
The Ring programming language version 1.10 book - Part 207 of 212The Ring programming language version 1.10 book - Part 207 of 212
The Ring programming language version 1.10 book - Part 207 of 212
Ā 
The Ring programming language version 1.10 book - Part 205 of 212
The Ring programming language version 1.10 book - Part 205 of 212The Ring programming language version 1.10 book - Part 205 of 212
The Ring programming language version 1.10 book - Part 205 of 212
Ā 
The Ring programming language version 1.10 book - Part 206 of 212
The Ring programming language version 1.10 book - Part 206 of 212The Ring programming language version 1.10 book - Part 206 of 212
The Ring programming language version 1.10 book - Part 206 of 212
Ā 
The Ring programming language version 1.10 book - Part 204 of 212
The Ring programming language version 1.10 book - Part 204 of 212The Ring programming language version 1.10 book - Part 204 of 212
The Ring programming language version 1.10 book - Part 204 of 212
Ā 
The Ring programming language version 1.10 book - Part 203 of 212
The Ring programming language version 1.10 book - Part 203 of 212The Ring programming language version 1.10 book - Part 203 of 212
The Ring programming language version 1.10 book - Part 203 of 212
Ā 
The Ring programming language version 1.10 book - Part 202 of 212
The Ring programming language version 1.10 book - Part 202 of 212The Ring programming language version 1.10 book - Part 202 of 212
The Ring programming language version 1.10 book - Part 202 of 212
Ā 
The Ring programming language version 1.10 book - Part 201 of 212
The Ring programming language version 1.10 book - Part 201 of 212The Ring programming language version 1.10 book - Part 201 of 212
The Ring programming language version 1.10 book - Part 201 of 212
Ā 
The Ring programming language version 1.10 book - Part 200 of 212
The Ring programming language version 1.10 book - Part 200 of 212The Ring programming language version 1.10 book - Part 200 of 212
The Ring programming language version 1.10 book - Part 200 of 212
Ā 
The Ring programming language version 1.10 book - Part 199 of 212
The Ring programming language version 1.10 book - Part 199 of 212The Ring programming language version 1.10 book - Part 199 of 212
The Ring programming language version 1.10 book - Part 199 of 212
Ā 
The Ring programming language version 1.10 book - Part 198 of 212
The Ring programming language version 1.10 book - Part 198 of 212The Ring programming language version 1.10 book - Part 198 of 212
The Ring programming language version 1.10 book - Part 198 of 212
Ā 
The Ring programming language version 1.10 book - Part 197 of 212
The Ring programming language version 1.10 book - Part 197 of 212The Ring programming language version 1.10 book - Part 197 of 212
The Ring programming language version 1.10 book - Part 197 of 212
Ā 
The Ring programming language version 1.10 book - Part 196 of 212
The Ring programming language version 1.10 book - Part 196 of 212The Ring programming language version 1.10 book - Part 196 of 212
The Ring programming language version 1.10 book - Part 196 of 212
Ā 
The Ring programming language version 1.10 book - Part 195 of 212
The Ring programming language version 1.10 book - Part 195 of 212The Ring programming language version 1.10 book - Part 195 of 212
The Ring programming language version 1.10 book - Part 195 of 212
Ā 
The Ring programming language version 1.10 book - Part 194 of 212
The Ring programming language version 1.10 book - Part 194 of 212The Ring programming language version 1.10 book - Part 194 of 212
The Ring programming language version 1.10 book - Part 194 of 212
Ā 
The Ring programming language version 1.10 book - Part 193 of 212
The Ring programming language version 1.10 book - Part 193 of 212The Ring programming language version 1.10 book - Part 193 of 212
The Ring programming language version 1.10 book - Part 193 of 212
Ā 
The Ring programming language version 1.10 book - Part 192 of 212
The Ring programming language version 1.10 book - Part 192 of 212The Ring programming language version 1.10 book - Part 192 of 212
The Ring programming language version 1.10 book - Part 192 of 212
Ā 

Recently uploaded

Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...Varun Mithran
Ā 
Navigation in flutter ā€“ how to add stack, tab, and drawer navigators to your ...
Navigation in flutter ā€“ how to add stack, tab, and drawer navigators to your ...Navigation in flutter ā€“ how to add stack, tab, and drawer navigators to your ...
Navigation in flutter ā€“ how to add stack, tab, and drawer navigators to your ...Flutter Agency
Ā 
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Workshop -  Architecting Innovative Graph Applications- GraphSummit MilanWorkshop -  Architecting Innovative Graph Applications- GraphSummit Milan
Workshop - Architecting Innovative Graph Applications- GraphSummit MilanNeo4j
Ā 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIInflectra
Ā 
Abortion Pill Prices Jane Furse ](+27832195400*)[ šŸ„ Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ šŸ„ Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ šŸ„ Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ šŸ„ Women's Abortion Clinic i...Abortion Clinic
Ā 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAShane Coughlan
Ā 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Maxim Salnikov
Ā 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfICS
Ā 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Conceptsthomashtkim
Ā 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanNeo4j
Ā 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckMarc Lester
Ā 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConNatan Silnitsky
Ā 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...Neo4j
Ā 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...naitiksharma1124
Ā 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdfSelfMade bd
Ā 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypseTomasz Kowalczewski
Ā 
architecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfarchitecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfWSO2
Ā 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)Roberto Bettazzoni
Ā 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaNeo4j
Ā 

Recently uploaded (20)

Abortion Pill Prices Turfloop ](+27832195400*)[ šŸ„ Women's Abortion Clinic in ...
Abortion Pill Prices Turfloop ](+27832195400*)[ šŸ„ Women's Abortion Clinic in ...Abortion Pill Prices Turfloop ](+27832195400*)[ šŸ„ Women's Abortion Clinic in ...
Abortion Pill Prices Turfloop ](+27832195400*)[ šŸ„ Women's Abortion Clinic in ...
Ā 
Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...
Ā 
Navigation in flutter ā€“ how to add stack, tab, and drawer navigators to your ...
Navigation in flutter ā€“ how to add stack, tab, and drawer navigators to your ...Navigation in flutter ā€“ how to add stack, tab, and drawer navigators to your ...
Navigation in flutter ā€“ how to add stack, tab, and drawer navigators to your ...
Ā 
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Workshop -  Architecting Innovative Graph Applications- GraphSummit MilanWorkshop -  Architecting Innovative Graph Applications- GraphSummit Milan
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Ā 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
Ā 
Abortion Pill Prices Jane Furse ](+27832195400*)[ šŸ„ Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ šŸ„ Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ šŸ„ Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ šŸ„ Women's Abortion Clinic i...
Ā 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
Ā 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
Ā 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
Ā 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Concepts
Ā 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Ā 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Ā 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
Ā 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
Ā 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
Ā 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Ā 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
Ā 
architecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfarchitecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdf
Ā 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
Ā 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
Ā 

The Ring programming language version 1.8 book - Part 78 of 202

  • 1. Ring Documentation, Release 1.8 ā€¢ The User Can click on the button many times to open many sub windows. ā€¢ Each Sub Window contains Two buttons. ā€¢ The ļ¬rst button in the sub window change the Main and the Sub Windows Titles. ā€¢ The second button in the sub window close the Sub Window. load "guilib.ring" new qApp { open_window( :MainWindowController ) exec() } class MainWindowController from WindowsControllerParent oView = new MainWindowView func SubWindowAction Open_window( :SubWindowController ) Last_Window().SetParentObject(self) class MainWindowView from WindowsViewParent win = new qWidget() { SetWindowTitle("Main Window") btnSub = new qPushButton(win) { setText("Sub Window") setClickEvent( Method( :SubWindowAction ) ) } resize(400,400) } class SubWindowController from WindowsControllerParent oView = new SubWindowView func SetMainWindowTitleAction Parent().oView.win.SetWindowTitle("Message from the Sub Window") oView.win.SetWindowTitle("Click Event Done!") class SubWindowView from WindowsViewParent win = new qWidget() { SetWindowTitle("Sub Window") btnMsg = new qPushButton(win) { setText("Set Main Window Title") setClickEvent( Method( :SetMainWindowTitleAction ) ) } btnClose = new qPushButton(win) { Move(200,0) setText("Close") setClickEvent( Method( :CloseAction ) ) } resize(400,400) } The next screen shot after creating three sub windows. 62.2. Example 741
  • 2. Ring Documentation, Release 1.8 The next screen shot after clicking on the button in each sub window. 62.2. Example 742
  • 3. Ring Documentation, Release 1.8 62.3 Open_WindowAndLink() Function We can use the Open_WindowAndLink() function to connect between the application windows, pass messages (call methods) between the objects. This function uses Meta-programming to deļ¬ne dynamic methods in the Caller Class to use the dynamic objects of other windows that we create. Example : (Uses the Form Designer) First Window 1. https://github.com/ring-lang/ring/blob/master/applications/formdesigner/tests/twowindowspart5/ļ¬rstwindowView.ring 2. https://github.com/ring-lang/ring/blob/master/applications/formdesigner/tests/twowindowspart5/ļ¬rstwindowController.ring Second Window 1. https://github.com/ring-lang/ring/blob/master/applications/formdesigner/tests/twowindowspart5/secondwindowView.ring 2. https://github.com/ring-lang/ring/blob/master/applications/formdesigner/tests/twowindowspart5/secondwindowController.ring 62.3. Open_WindowAndLink() Function 743
  • 4. Ring Documentation, Release 1.8 In the next code for example (from FirstWindowController.ring) The Open_WindowAndLink() will create an object from the SecondWindowController Class Then will add the Method : SecondWindow(), IsSecondWindow() Methods to the FirstWindowController Class Also will add the Method : FirstWindow(), IsFirstWindow() Methods to the SecondWindowController Class So the SendMessage() method in FirstWindowController class can use the SecondWindow() method to access the object. This is more simple than using Last_Window(), Parent() and SetParentObject() methods. class firstwindowController from windowsControllerParent oView = new firstwindowView func OpenSecondWindow Open_WindowAndLink(:SecondWindowController,self) func SendMessage if IsSecondWindow() SecondWindow().setMessage("Message from the first window") ok func setMessage cMessage oView.Label1.setText(cMessage) 62.4 Open_WindowInPackages() Function The Open_WindowInPackages() function is the same as Open_Window() but takes an extra list that determine the packages to import before opening the window. Syntax: Open_WindowInPackages(cClassName,aPackagesList) Example: The next example from the Form Designer source code, Open the Window Flags window using the open_windowInPackages() function. We determine the class name ā€œWindowFlagsControllerā€ and the packages name. The Window Flags window uses the FormDesigner and System.GUI packages. open_windowInPackages(:WindowFlagsController,[ "formdesigner", "System.GUI" ]) 62.5 Objects Library Source Code The library source code is very simple, You can check the source code ļ¬les ā€¢ https://github.com/ring-lang/ring/blob/master/extensions/ringqt/objectslib/objects.ring ā€¢ https://github.com/ring-lang/ring/blob/master/extensions/ringqt/objectslib/subwindows.ring 62.4. Open_WindowInPackages() Function 744
  • 5. CHAPTER SIXTYTHREE USING THE FORM DESIGNER In this chapter we will learn about using the Form Designer. We can run the From Designer from Ring Notepad From the Menubar in Ring Notepad - View Menu - We can Show/Hide the Form Designer window. Also we can run the Form Designer in another window. From the Ring Notepad - Tools Menu - Select the Form Designer. 745
  • 6. Ring Documentation, Release 1.8 63.1 The Designer Windows ā€¢ Toolbox : To select controls to be added to the window. ā€¢ Properties : To set the properties of the active window or controls. ā€¢ Design Region : To select, move and resize the window and the controls. 63.2 The Toolbox We have many buttons. ā€¢ Lock : We can use it to draw many controls of the same type quickly. ā€¢ Select : We can use it to select a control in the Design Region ā€¢ Controls Buttons : Select a control to be added to the window. 63.3 The Properties ā€¢ When we select the window or one control, We will have the selected object properties. ā€¢ Also In the properties window we have a combobox to select the active control. ā€¢ Some properties provide a button next to the property value. We can click on the button to get more options. ā€¢ When we select more than one control, We will have options for multi-selection 63.1. The Designer Windows 746
  • 7. Ring Documentation, Release 1.8 63.4 Running Forms When we save the form ļ¬le (*.rform), The Form Designer will create two Ring ļ¬les ā€¢ The Controller Class ā€¢ The View Class For example, if the form ļ¬le is helloworld.rform The form designer will generate two ļ¬les ā€¢ helloworldcontroller.ring ā€¢ helloworldview.ring To run the program, Open the controller class ļ¬le then click the Run button (CTRL+F5) Tip: When you open a form using Ring Notepad, the controller class will be opened automatically, So we can press (CTRL+F5) or click on the Run button while the form designer window is active. 63.5 Events Code 1. Just type the method name in the event property. 63.4. Running Forms 747
  • 8. Ring Documentation, Release 1.8 (2) Then write the method code in the controller class. 63.5. Events Code 748
  • 9. Ring Documentation, Release 1.8 In this example we write func CloseWindow oView.win.close() Where inside the controller class, We uses the oView object to access the form. Another Example : 63.5. Events Code 749
  • 10. Ring Documentation, Release 1.8 The Event Code func SayHello oView { LineEdit2.setText("Hello "+ LineEdit1.text() ) } 63.6 Keyboard Shortcuts After selecting one or group of controls ā€¢ Use the Arrows (Up, Down, Left and Right) to move them around. ā€¢ Shift + the Arrows (Up, Down, Left and Right) to Resize the controls. ā€¢ Del button to delete the controls. ā€¢ CTRL+SHIFT+V to Duplicate the controls. 63.7 Menubar Designer From the Window properties we can open the Menubar Designer 63.6. Keyboard Shortcuts 750