初めまして。
htmlのテーブル生成ツールを制作しているのですが、
webサイトでよく見る、overfllowスクロールボックスのようなものが作りたくて
似たようなサンプルを探しているのですがなかなか見つからず困っています。
参考までに以下にスクリプト載せときます。
縦セルの追加をした時に画面に収まる限界があるのでどうしようか困っています。
また、ここはこうした方が使いやすいなどアドバイスください。
// HTMLソース整形ツール - table整形 -
// 最大化ウィンドウ、ウィンドウサイズ可変
#include "user32.as"
screen 0, ginfo(20), ginfo(21)
// 自ウィンドウのスタイルを変更
// $10000 = 最大化ボタン有効
// $40000 = ウィンドウサイズ可変有効
GetWindowLong hwnd, -16
SetWindowLong hwnd, -16, stat | $10000 | $40000
// 実際に表示するサイズを指定
width 700, 550
// スクリプトから最大化ウィンドウにしたい場合
// sendmsg hwnd, $112, $F030
;初期設定
title "htmlテーブル作成支援 ver1.0"
;オブジェクトの初期入力文字
t1 = "タイトル1" ; 文字列型
t2 = "タイトル2"
t3 = "タイトル3"
t4 = "タイトル4"
t5 = "タイトル5"
a = "a"
b = "b"
c = "c"
d = "d"
e = "e"
a2 = "a2"
b2 = "b2"
c2 = "c2"
d2 = "d2"
e2 = "e2"
a3 = "a3"
b3 = "b3"
c3 = "c3"
d3 = "d3"
e3 = "e3"
a4 = "a4"
b4 = "b4"
c4 = "c4"
d4 = "d4"
e4 = "e4"
a5 = "a5"
b5 = "b5"
c5 = "c5"
d5 = "d5"
e5 = "e5"
; オブジェクトの表示位置
pos 25, 25
; 入力ボックス設置 ◇input 変数, 横幅サイズ, 高さサイズ, 最大文字数◇
pos 5 , 25 : input t1, 100, 25
pos 110, 25 : input t2, 100, 25
pos 215, 25 : input t3, 100, 25
pos 320, 25 : input t4, 100, 25
pos 425, 25 : input t5, 100, 25
pos 5 , 55 : input a, 100, 25
pos 110, 55 : input b, 100, 25
pos 215, 55 : input c, 100, 25
pos 320, 55 : input d, 100, 25
pos 425, 55 : input e, 100, 25
pos 5 , 85 : input a2, 100, 25
pos 110, 85 : input b2, 100, 25
pos 215, 85 : input c2, 100, 25
pos 320, 85 : input d2, 100, 25
pos 425, 85 : input e2, 100, 25
pos 5 ,115 : input a3, 100, 25
pos 110,115 : input b3, 100, 25
pos 215,115 : input c3, 100, 25
pos 320,115 : input d3, 100, 25
pos 425,115 : input e3, 100, 25
pos 5 ,145 : input a4, 100, 25
pos 110,145 : input b4, 100, 25
pos 215,145 : input c4, 100, 25
pos 320,145 : input d4, 100, 25
pos 425,145 : input e4, 100, 25
pos 5 ,175 : input a5, 100, 25
pos 110,175 : input b5, 100, 25
pos 215,175 : input c5, 100, 25
pos 320,175 : input d5, 100, 25
pos 425,175 : input e5, 100, 25
; 区切り線
syscolor 15
boxf
pos 5, 20
winobj "static", "", , $50000000 | $10, 525
pos 5, 205
winobj "static", "", , $50000000 | $10, 525
; 横列追加
pos 530,25 : objsize 25,175 : button goto ">", *yokoretutuika
; 実行ボタン
pos 120,210 : objsize 300,40 : button goto "実行", *check2
; 実行結果表示 ◇mesbox 変数, 横幅サイズ, 高さサイズ, スタイル(0or1or5), 最大文字数◇
result="実行ボタンを押すことでこのエリアに結果が反映されます。"
pos 5, 255 : mesbox result, 520, 220, 1, : mbID = stat
stop
*check2
gosub *check
result=""+h1+h2+h3+h4+h5+h6+h7+h8+h9+h10+h11+h12+h13+h14+h15+h16+h17+h18+h19+h20+h21+h22+h23+h24+h25+h26+h27+h28+h29+h30+h31+h32+h33+h34+h35+h36+h37+h38+h39+h40+h41+h42+h43+hfin
pos 25, 200 : objprm mbID, result
stop
*check
; htmlベース
h1 = "\<table>\n"
h2 = "\t\<tr>\n"
h3 = "\t\t<td>"+t1+"</td>\n"
h4 = "\t\t<td>"+t2+"</td>\n"
h5 = "\t\t<td>"+t3+"</td>\n"
h6 = "\t\t<td>"+t4+"</td>\n"
h7 = "\t\t<td>"+t5+"</td>\n"
h8 = "\t\</tr>\n"
h9 = "\t\<tr>\n"
h10 = "\t\t<td>"+a+"</td>\n"
h11 = "\t\t<td>"+b+"</td>\n"
h12 = "\t\t<td>"+c+"</td>\n"
h13 = "\t\t<td>"+d+"</td>\n"
h14 = "\t\t<td>"+e+"</td>\n"
h15 = "\t\</tr>\n"
h16 = "\t\<tr>\n"
h17 = "\t\t<td>"+a2+"</td>\n"
h18 = "\t\t<td>"+b2+"</td>\n"
h19 = "\t\t<td>"+c2+"</td>\n"
h20 = "\t\t<td>"+d2+"</td>\n"
h21 = "\t\t<td>"+e2+"</td>\n"
h22 = "\t\</tr>\n"
h23 = "\t\<tr>\n"
h24 = "\t\t<td>"+a3+"</td>\n"
h25 = "\t\t<td>"+b3+"</td>\n"
h26 = "\t\t<td>"+c3+"</td>\n"
h27 = "\t\t<td>"+d3+"</td>\n"
h28 = "\t\t<td>"+e3+"</td>\n"
h29 = "\t\</tr>\n"
h30 = "\t\<tr>\n"
h31 = "\t\t<td>"+a4+"</td>\n"
h32 = "\t\t<td>"+b4+"</td>\n"
h33 = "\t\t<td>"+c4+"</td>\n"
h34 = "\t\t<td>"+d4+"</td>\n"
h35 = "\t\t<td>"+e4+"</td>\n"
h36 = "\t\</tr>\n"
h37 = "\t\<tr>\n"
h38 = "\t\t<td>"+a5+"</td>\n"
h39 = "\t\t<td>"+b5+"</td>\n"
h40 = "\t\t<td>"+c5+"</td>\n"
h41 = "\t\t<td>"+d5+"</td>\n"
h42 = "\t\t<td>"+e5+"</td>\n"
h43 = "\t\</tr>\n"
hfin = "\</table>"
return
*yokoretutuika
clrobj 32, 32
t6 = "タイトル6"
f = "f"
f2 = "f2"
f3 = "f3"
f4 = "f4"
f5 = "f5"
f6 = "f6"
pos 530, 25 : input t6, 100, 25
pos 530,55 : input f, 100, 25
pos 530,85 : input f2, 100, 25
pos 530,115 : input f3, 100, 25
pos 530,145 : input f4, 100, 25
pos 530,175 : input f5, 100, 25
stop