質問編集履歴
2
誤字の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -90,41 +90,61 @@
|
|
90
90
|
|
91
91
|
|
92
92
|
|
93
|
-
|
93
|
+
def click_button_1(event):
|
94
|
+
|
94
|
-
|
95
|
+
dbname = 'database.db'
|
95
|
-
|
96
|
-
|
96
|
+
|
97
|
-
conn = sqlite3.connect(dbname)
|
97
|
+
conn = sqlite3.connect(dbname)
|
98
|
-
|
98
|
+
|
99
|
-
c = conn.cursor()
|
99
|
+
c = conn.cursor()
|
100
|
-
|
100
|
+
|
101
|
-
c.execute("create table Test_1_table(atai0,atai1,atai2,atai3);")
|
101
|
+
c.execute("create table Test_1_table(atai0,atai1,atai2,atai3);")
|
102
|
-
|
102
|
+
|
103
|
-
text_1_1 = (text_1.GetValue())
|
103
|
+
text_1_1 = (text_1.GetValue())
|
104
|
-
|
104
|
+
|
105
|
-
text_2_1 = (text_2.GetValue())
|
105
|
+
text_2_1 = (text_2.GetValue())
|
106
|
-
|
106
|
+
|
107
|
-
text_3_1 = (text_3.GetValue())
|
107
|
+
text_3_1 = (text_3.GetValue())
|
108
|
-
|
108
|
+
|
109
|
-
text_4_1 = (text_4.GetValue())
|
109
|
+
text_4_1 = (text_4.GetValue())
|
110
|
-
|
111
|
-
|
112
|
-
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
-
purchases = (text_1_1,text_2_1,text_3_1,text_4_1)
|
113
|
+
purchases = (text_1_1,text_2_1,text_3_1,text_4_1)
|
114
|
-
|
114
|
+
|
115
|
-
sql = 'insert into Test_1_table values(?,?,?,?);'
|
115
|
+
sql = 'insert into Test_1_table values(?,?,?,?);'
|
116
|
-
|
116
|
+
|
117
|
-
c.execute(sql , purchases)
|
117
|
+
c.execute(sql , purchases)
|
118
|
-
|
118
|
+
|
119
|
-
c.execute("select atai0,atai1,atai2,atai3 from Test_1_table;")
|
119
|
+
c.execute("select atai0,atai1,atai2,atai3 from Test_1_table;")
|
120
|
-
|
120
|
+
|
121
|
-
conn.commit()
|
121
|
+
conn.commit()
|
122
|
-
|
122
|
+
|
123
|
-
conn.close()
|
123
|
+
conn.close()
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
layout_1.Add(text_1, flag=wx.EXPAND | wx.ALL,border=10)
|
128
|
+
|
129
|
+
layout_1.Add(text_2, flag=wx.EXPAND | wx.ALL,border=10)
|
130
|
+
|
131
|
+
layout_1.Add(text_3, flag=wx.EXPAND | wx.ALL,border=10)
|
132
|
+
|
133
|
+
layout_1.Add(text_4, flag=wx.EXPAND | wx.ALL,border=10)
|
134
|
+
|
135
|
+
layout_1.Add(button_1, 0, wx.GROW)
|
124
136
|
|
125
137
|
|
126
138
|
|
139
|
+
button_1 = wx.Button(panel_1, wx.ID_ANY, '送信')
|
140
|
+
|
141
|
+
button_1.Bind(wx.EVT_BUTTON,click_button_1)
|
142
|
+
|
143
|
+
|
144
|
+
|
127
|
-
|
145
|
+
panel_1.SetSizer(layout_1)
|
146
|
+
|
147
|
+
|
128
148
|
|
129
149
|
class App_1(wx.Frame):#資料台帳閲覧
|
130
150
|
|
1
誤字の修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
WXPythonでSQLiteのテーブルの
|
1
|
+
WXPythonでSQLiteのテーブルのレコードを表示したい
|
test
CHANGED
@@ -50,8 +50,6 @@
|
|
50
50
|
|
51
51
|
|
52
52
|
|
53
|
-
|
54
|
-
|
55
53
|
```
|
56
54
|
|
57
55
|
### 該当のソースコード
|
@@ -150,7 +148,7 @@
|
|
150
148
|
|
151
149
|
c = conn.cursor()
|
152
150
|
|
153
|
-
c.execute("select atai0,atai1,atai2,atai3
|
151
|
+
c.execute("select atai0,atai1,atai2,atai3 from Test_1_table;")
|
154
152
|
|
155
153
|
row = c.fetchone()
|
156
154
|
|
@@ -160,7 +158,7 @@
|
|
160
158
|
|
161
159
|
mojiretu = ''.join(maped_list)
|
162
160
|
|
163
|
-
read_text_1 = wx.StaticText(panel_5, wx.ID_ANY, mojiretu)
|
161
|
+
read_text_1 = wx.StaticText(panel_5, wx.ID_ANY, mojiretu)
|
164
162
|
|
165
163
|
row = c.fetchone()
|
166
164
|
|
@@ -172,7 +170,7 @@
|
|
172
170
|
|
173
171
|
|
174
172
|
|
175
|
-
panel_
|
173
|
+
panel_2.SetSizer(layout_1)
|
176
174
|
|
177
175
|
|
178
176
|
|