---
title: "GTK 常用圖形元件"
author: "cjc"
date: "2008-08-01T12:47:00Z"
tags: []
slug: "gtk"
draft: false
lastmod: "2008-08-01T12:47:00Z"
id: 402854
url: "https://cjc.iteye.com/blog/402854"
---

&lt;script&gt;function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}&lt;/script&gt;元件講是講不完的，這邊主要在簡介幾個 元件作用。

- 按鈕

按鈕是視窗 程式中最基本的元件。

- - [GtkButton 與 GtkToggleButton](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkButtonGtkToggleButton.html)
  - [影 像及文字按鈕](http://caterpillar.onlyfun.net/Gossip/GTKGossip/ButtonWithImage.html)
  - [GtkCheckButton 與 GtkRadioButton](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkCheckButtonGtkRadioButton.html)
- 對話方塊

對話方塊用來與使 用者作簡單的訊息交換與溝通。

- - [GtkMessageDialog](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkMessageDialog.html)
  - [GtkAboutDialog](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkAboutDialog.html)
  - [GtkColorButton 與 GtkColorSelectionDialog](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkColorButtonColorSelectionDialog.html)
  - [GtkFontButton 與 GtkFontSelectionDialog](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkFontButtonFontSelectionDialog.html)
  - [GtkFileChooserButton 與 GtkFileChooserDialog](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkFileChooserButtonFileChooserDialog.html)
  - [使 用 GtkDialog 自訂對話方塊](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkDialog.html)
- 文字欄位

文字欄位是使用者 輸入資訊的基本元件。

- - [GtkEntry](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkEntry.html)
  - [GtkSpinButton](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkSpinButton.html)
  - [GtkTextView](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkTextView.html)
- 選項清單

這邊的選項清單元 件，遵守 MVC 設計，使用上較為複雜但應用彈性大。

- - [GtkComboBox](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkComboBox.html)
  - [GtkComboBox 與 GtkListStore](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkComboBoxGtkListStore.html)
  - [GtkComboBox 與 GtkTreeStore](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkComboBoxGtkTreeStore.html)
  - [GtkTreeView 與 GtkListStore](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkTreeViewGtkListStore.html)
  - [GtkTreeView 與 GtkTreeStrore](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkTreeViewGtkTreeStrore.html)
- 版面元件

除了上面介紹的三 種基本版面配置之外，還可以使用一些版面元件來協助元件的群組與版面的切割。

- - [GtkNotebook](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkNotebook.html)
  - [GtkPaned](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkPaned.html)
  - [GtkScrolledWindow](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkScrolledWindow.html)
  - [GtkAlignment、GtkFixed 與 GtkLayout](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkAlignmentGtkFixedGtkLayout.html)
  - [GtkFrame 與 GtkAspectFrame](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkFrameGtkAspectFrame.html)
- 選單元件

選單是視窗程式最常見的功能了。

- - [GtkHandleBox](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkHandleBox.html)
  - [GtkMenuBar、GtkMenu 與 GtkMenuItem](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkMenuBarGtkMenuGtkMenuItem.html)
  - [GtkCheckMenuItem、GtkRadioMenuItem 與GtkTearoffMenuItem](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkCheckMenuItemGtkRadioMenuItemGtkTearoffMenuItem.html)
  - [GtkUIManager](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkUIManager.html)
- 其它常用元件

簇繁不及備 載...Orz...

- - [GtkLabel](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkLabel.html)
  - [GtkScale](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkScale.html)
  - [GtkProgressBar](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkProgressBar.html)
  - [GtkToolBar](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkToolBar.html)
  - [GtkStatusBar](http://caterpillar.onlyfun.net/Gossip/GTKGossip/GtkStatusBar.html)