Ticket #12985: Test.yab

File Test.yab, 1.2 KB (added by bbjimmy, 3 years ago)

A yab script that easily shows the issue.

Line 
1#!yab
2
3doc Place a description of your
4doc program here.
5doc
6doc Author, date, license
7
8// set DEBUG = 1 to print out all messages on the console
9DEBUG = 1
10
11OpenWindow()
12
13// Main Message Loop
14dim msg$(1)
15while(not leavingLoop)
16 nCommands = token(message$, msg$(), "|")
17
18 for everyCommand = 1 to nCommands
19 if(DEBUG and msg$(everyCommand)<>"") print msg$(everyCommand)
20
21 switch(msg$(everyCommand))
22 case "_QuitRequested"
23 case "MainWindow:_QuitRequested"
24 leavingLoop = true
25 break
26 default
27
28 end switch
29
30 next everyCommand
31 x=treebox get "TB"
32 //print x
33
34wend
35
36CloseWindow()
37
38end
39
40
41// Setup the main window here
42sub OpenWindow()
43 window open 100,100 to 600,500, "MainWindow", "Main Window"
44 Window set "MainWindow","flags", "Not-Zoomable Not-Resizable"
45 SPLITVIEW 0,0 TO 500,400, "SplitView", 1, 1, "MainWindow"
46 SPLITVIEW SET "SplitView", "Divider", 100
47 SPLITVIEW SET "SplitView", "MinimumSizes", 100, 200
48 TREEBOX 0,0 to 300,400, "TB", 1, "SplitView1"
49 TREEBOX ADD "TB", "First Item"
50 TREEBOX ADD "TB", "First Item", "Sub item1",0
51 TREEBOX ADD "TB", "First Item", "Sub item2",0
52 TEXTEDIT 0,0 TO 390,400, "TE", 1, "SplitView2"
53
54
55 return
56end sub
57
58// Close down the main window
59sub CloseWindow()
60 window close "MainWindow"
61 return
62end sub