svlad

Check-in [5c626a4a09]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added menu.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:5c626a4a0938bd5b8af0843513fbdbe7913dcc4d
User & Date: severak 2012-04-15 19:54:13
Context
2012-04-16
20:15
Added first action. check-in: 25bf48a75d user: severak tags: trunk
2012-04-15
19:54
Added menu. check-in: 5c626a4a09 user: severak tags: trunk
17:24
now basic events are handled check-in: 3d231a001c user: severak tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to svlad.lua.

55
56
57
58
59
60
61




62
63
64
65















66
67
68
69



70
71
72
73
74
75
76
77
78
79
80
81


82
  return false
end

function OnHeaderClick(sender,IsColumn,index)
  print("OnHeaderClick")
  print(IsColumn,index)
end





env=luasql.sqlite3()
conn=assert(env:connect("prachy.db3"))

















main=VCL.Form("mainWin")
main._={ caption="Svlad", width=500, height=500, onshow="listtables", onclose="appEnd" }




tabl=VCL.StringGrid(main,"table")
tabl._={ align="alClient", rowCount=99, ColCount=99,  AutoEdit=1, Options="goEditing,goRowSizing,goColSizing", OnSetEditText="setEdit", OnGetEditText="getEdit", OnHeaderClick="OnHeaderClick" }

p=VCL.Panel(main,"panel")
p._={ align="alBottom", height=90 }

sql=VCL.Memo(p,"sql")
sql._={ align="alClient",  font={name="Courier"} }

fire=VCL.Button(p,"fire")
fire._={ align="alBottom", caption="PAL!", onclick="sql_dotaz" }



main:ShowModal()







>
>
>
>




>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




>
>
>












>
>

55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
  return false
end

function OnHeaderClick(sender,IsColumn,index)
  print("OnHeaderClick")
  print(IsColumn,index)
end

function showAbout(sender)
  VCL.ShowMessage("SVLAD\n\nTable editor by Severak")
end

env=luasql.sqlite3()
conn=assert(env:connect("prachy.db3"))

menu={
  {caption="&Databases",submenu={
    {caption="&Attach"},
    {caption="&Import"},
    {caption="&Export"}
  }},
  {caption="&Actions",submenu={
    {caption="&Show tables"}
  }},
  {caption="&About",submenu={
    {name="about",caption="&About",onclick="showAbout"},
    {caption="-"},
    {caption="&Info"}
  }}
}

main=VCL.Form("mainWin")
main._={ caption="Svlad", width=500, height=500, onshow="listtables", onclose="appEnd" }

mainMenu=VCL.MainMenu("mm")
mainMenu:LoadFromTable(menu)

tabl=VCL.StringGrid(main,"table")
tabl._={ align="alClient", rowCount=99, ColCount=99,  AutoEdit=1, Options="goEditing,goRowSizing,goColSizing", OnSetEditText="setEdit", OnGetEditText="getEdit", OnHeaderClick="OnHeaderClick" }

p=VCL.Panel(main,"panel")
p._={ align="alBottom", height=90 }

sql=VCL.Memo(p,"sql")
sql._={ align="alClient",  font={name="Courier"} }

fire=VCL.Button(p,"fire")
fire._={ align="alBottom", caption="PAL!", onclick="sql_dotaz" }

showAbout()

main:ShowModal()