## Visual Tcl
PAGE is based on Stewart Allen’s Visual Tcl program. In fact, it is vTcl, with modifications and several additional modules that generates Python code. And yes, it is written in Tcl! Why not? Tcl is a great language to have available on your machine. It has features which I would like to see in Python. There are many great programs written in that language. Further, it leaves the door open to use the same techniques for GUI builders in other languages which support Tk. The disadvantage of using a Tcl implementation is that one is restricted to widget sets which are available to both Tcl and Python. Ann additional disadvantage is that Windows users probably need to install Tcl/Tk. In previous versions of PAGE, I supported Tix widgets to provide a comprehensive widget set. With the arrival of ttk widgets in Tcl/Tk 8.5, I felt that the ttk widget set was sufficient and dropped Tix.
PAGE基于Stewart Allen的Visual Tcl程序。 實際上,它是vTcl,經過修改和生成Python代碼的其他幾個模塊。 是的,它是用Tcl編寫的! 為什么不? Tcl是一種很棒的語言,可在您的計算機上使用。 它具有我想在Python中看到的功能。 有很多用這種語言編寫的程序。 此外,它為其他支持Tk的語言的GUI構建器使用相同的技術提供了方便。 使用Tcl實現的缺點是只能使用Tcl和Python都可以使用的小部件集。 另一個缺點是Windows用戶可能需要安裝Tcl / Tk。 在PAGE的早期版本中,我支持Tix小部件以提供全面的小部件集。 隨著ttk小部件在Tcl / Tk 8.5中的出現,我覺得ttk小部件集已足夠并刪除了Tix。
PAGE is a modified version of Visual Tcl. Visual Tcl is a interactive Tcl/Tk program for generating whole projects in Tcl/Tk. Building PAGE, I added the feature of also generating a Python program which realizes the same GUI. My changes were primarily to:
PAGE是Visual Tcl的修改版本。 Visual Tcl是一個交互式Tcl / Tk程序,用于在Tcl / Tk中生成整個項目。 構建PAGE時,我添加了還生成可實現相同GUI的Python程序的功能。 我的更改主要是:
* Add the modules which generate Python code.
* 添加生成Python代碼的模塊。
* 為ttk小部件集以及一些小部件(如列表框,文本框和樹視圖)的滾動版本的Visual Tcl添加支持。
* Aim the program to handle only one top level window. I ditched the whole window project orientation. Facilities for testing Tcl programs, for defining functions, support for multiple toplevel windows, and support for geometry managers other than the placer geometry manager were among those deleted.
* 旨在使該程序僅處理一個頂級窗口。 我放棄了整個窗口項目的方向。 其中刪除了用于測試Tcl程序,定義功能,支持多個頂層窗口以及支持幾何圖形管理器(而不是放置幾何圖形管理器)的功能。
* Simplify the interface to only support the needs of one building Python interfaces.
* 簡化接口,使其僅支持一個構建Python接口的需求。
* Write some documentation and comments for the program. Documentation of Virtual Tcl is virtually nonexistent and that is truly sad but all too common with open source programming.
* 為該程序編寫一些文檔和注釋。 Virtual Tcl的文檔實際上是不存在的,這確實讓人很難過,但在開源編程中太普遍了。
* Fix bugs.
My changes have become so numerous that it is perhaps wrong to call it merely a modification of Virtual Tcl. I now think of PAGE as a fork which will probably be of little interest to the maintainers of Vtcl nor should they be saddled with any responsibility for the state of my version. Since I have diverged so much from Visual Tcl, I decided to replace the Visual Tcl splash screen.
我的更改變得如此之多,以至于僅將其稱為Virtual Tcl的修改就是錯誤的。 我現在把PAGE看作是一個分支,這可能對Vtcl的維護者們沒什么興趣,也不應該為我的版本狀態承擔任何責任。 由于我與Visual Tcl的差異很大,因此我決定更換Visual Tcl初始屏幕。
I was looking at different GUI generators for Tcl/Tk with a view of converting the output of one to Python when I came across Visual Tcl and the work of Constantin Teodorescu in generating Java from Visual Tcl. I thought if one could automatically generate Java, it should be even easier and much better to generate Python.
當我遇到Visual Tcl和Constantin Teodorescu從Visual Tcl生成Java的工作時,我正在研究Tcl / Tk的不同GUI生成器,以將其輸出轉換為Python。 我以為如果可以自動生成Java,則生成Python應該更容易,更好。
I believe that Stewart Allen wrote Visual Tcl in the 1996-1998 time period to aid in the development of Tcl/Tk applications. Constantin Teodorescu modified vTcl to generate Java code using SWING as the widget set. Looking at the Java generator convinced me to try doing PAGE. I was able to discern its behavior in spite of the nearly total lack of documentation, usually finding an existing procedure when needed.
我相信Stewart Allen在1996-1998年期間撰寫了Visual Tcl,以幫助開發Tcl / Tk應用程序。 Constantin Teodorescu修改了vTcl以使用SWING作為窗口小部件集來生成Java代碼。 看著Java生成器說服了我嘗試進行PAGE。 盡管幾乎完全沒有文檔,但是我仍然能夠辨別它的行為,通常在需要時找到一個現有的過程。
PAGE supports only the placer geometry manager. In the past, I worked with Visual Basic and the placer geometry manager seemed comfortable and got me useful results. Similarly, Constantin Teodorescu also limited the Java generation to the placer geometry manager. It seems really natural with the drag and drop paradigm. One disadvantage is that some of the sizes could be wrong if fonts change. This is because several Tk widgets have sizing based on font parameters. This has implications if the GUI is generated with different fonts or resolution than are active during execution. There may also be similar problems if the generated GUI is moved to other platforms or environments. It is interesting that many people writing about Tk and Tkinter dismiss the placer geometry manager.
PAGE僅支持布局幾何管理器。 過去,我曾與Visual Basic一起工作過,而砂輪幾何管理器似乎很舒適,并為我提供了有用的結果。 同樣,康斯坦丁·特奧多雷斯庫(Constantin Teodorescu)也將Java代僅限于布局幾何管理器。 拖放范例似乎很自然。 一個缺點是,如果更改字體,某些大小可能會出錯。 這是因為幾個Tk小部件具有基于字體參數的大小。 如果生成的GUI具有與執行期間不同的字體或分辨率,則可能會產生影響。 如果將生成的GUI移至其他平臺或環境,也可能會出現類似的問題。 有趣的是,許多關于Tk和Tkinter的文章都忽略了布局幾何管理器。
- 介紹
- 更新記錄
- X Concepts
- Visual Tcl
- 使用PAGE設計范例
- 項目目錄配置
- Python 2 or Python 3
- Python編碼和UTF-8
- 使用PAGE的簡短說明
- PAGE的狀態
- 安裝
- PAGE界面
- 主菜單
- 子菜單
- 組件工具欄
- 屬性編輯器
- 組件樹
- 綁定操作窗口
- 菜單編輯器
- 首選項窗口
- Python控制臺
- 回調窗口
- 應用窗口
- 顏色對話框
- 顏色
- 雙顯示器
- 默認值和首選項
- Preferences Windows
- Color Preferences
- Font Preferences
- 模塊結構
- 風格和主題
- 使用PAGE
- 命名約定
- 概述
- Toplevel Geometry
- 別名
- 氣球幫助-工具提示
- 選擇和修改組件
- 修改組件位置和尺寸
- 鎖定組件
- 填充容器
- 剪切,復制和粘貼
- Stash and Apply - Propagate Widget Options
- 菜單組件
- 回調函數
- 將事件鏈接到回調函數
- 創建綁定
- 為滾動組件創建綁定
- 定義回調函數
- 查看回調
- 指定字體
- Toplevel Widget
- 相對位置
- Tkinter變量類
- Ttk Widgets
- Scrolled Widgets
- Ttk Notebook and PNotebook
- Ttk Panedwindow
- Ttk Treeview
- Entry
- Ttk Entry
- Ttk Combobox
- Radiobuttons
- 文本和變量的奇異性
- Label
- Listbox
- Spinbox
- Scale and TScale
- TSeparator
- Sizegrip
- Custom Widgets
- Canvas
- 生成,檢查和運行Python GUI
- 創建和保存代碼模塊
- 檢查生成的Python模塊
- 執行Python模塊
- 將生成的Python模塊加載到IDE中
- 具有多個頂級Windows的應用程序
- 修改光標
- 使用圖像
- 動態組件
- 菜單
- 重建
- 自動更新支持模塊
- 重用
- 模板
- 從現有項目中借用組件
- 范例
- 結語