URN Logo
UNIX Resources » Linux » China Linux Forum » Perl 编 程 » 4 » 关于 Gtk2::TextView ?
announcement 声明: 本页内容为中国Linux论坛的内容镜像,文章的版权以及其他所有的相关权利属于中国Linux论坛和相应文章的作者,如果转载,请注明文章来源及相关版权信息。
Resources
China Linux Forum(finished)
Linux Forum(finished)
FreeBSD China(finished)
linuxforum.net
  业界新闻与评论
  自由软件杂谈
  IT 人生
  Linux软件快递
  翻译作坊
  Linux图书与评论
  GNU Emacs/XEmacs
  Linux 中文环境和中文化
  Linux桌面与办公软件
  Linux 多媒体与娱乐版
  自由之窗Mozilla
  笔记本电脑上的Linux
  Gentoo
  Debian 一族
  网络管理技术
  Linux 安装与入门
  WEB服务器和FTP服务器
  域名服务器和邮件服务器
  Linux防火墙和代理服务器应用
  文件及打印服务器
  技术培训与认证
  Linux内核技术
  Linux 嵌入技术
  Linux设备驱动程序
  Linux 集群技术
  LINUX平台数据库
  系统和网络安全
  CPU 与 编译器
  系统计算研究所专栏
  Linux下的GUI软件开发
  C/C++编程版
  PHP 技 术
  Java&jsp技术
  Shell编程技术
  Perl 编 程
  Python 编 程
  XML/Web Service 技术
  永远的Unix
  FreeBSD世界
   
关于 Gtk2::TextView ?
关于 Gtk2::TextView ? - knoppix [2004-10-05 17:52 | 46 byte(s)]
 
Re: 关于 Gtk2::TextView ? - Viperii [2004-10-05 19:02 | 637 byte(s)]
 
Re: 关于 Gtk2::TextView ? - knoppix [2004-10-06 23:45 | 95 byte(s)]
 
TextView 的 WrapMode 应该怎样设置呢? - knoppix [2004-10-06 16:41 | 288 byte(s)]
 
 
 
Subject: 关于 Gtk2::TextView ?
Author: knoppix    Posted: 2004-10-05 17:52    Length: 46 byte(s)
[Original] [Print] [Top]
谁有使用 Gtk2::TextView 的例子代码?
----
Welcome to the world of choices and performance.
[Original] [Print] [Top]
Subject: Re: 关于 Gtk2::TextView ?
Author: Viperii    Posted: 2004-10-05 19:02    Length: 637 byte(s)
[Original] [Print] [Top]
#!/usr/bin/perl -w

use strict;
use Glib ':constants';
use Gtk2 -init;

my $window = Gtk2::Window->new;
my $scroll = Gtk2::ScrolledWindow->new;
my $textview = Gtk2::TextView->new;
my $vbox = Gtk2::VBox->new;

$window->add ($vbox);
$vbox->add ($scroll);
$scroll->add ($textview);

$window->show_all;

$window->signal_connect (destroy => sub {Gtk2->main_quit});

Gtk2->main;
----
Where is the RED pill? I want OUT!
[Original] [Print] [Top]
Subject: TextView 的 WrapMode 应该怎样设置呢?
Author: knoppix    Posted: 2004-10-06 16:41    Length: 288 byte(s)
[Original] [Print] [Top]
TextView 的 WrapMode 应该怎样设置呢?

我曾看到这样的写法:
$self->set_wrap_mode('word');
以及这样的写法:
$textview->set_wrap_mode($opts->{wrap_mode} || 'word');

WrapMode 究竟可以设哪些值呢?
----
Welcome to the world of choices and performance.
[Original] [Print] [Top]
Subject: Re: TextView 的 WrapMode 应该怎样设置呢?
Author: Viperii    Posted: 2004-10-06 18:45    Length: 39 byte(s)
[Original] [Print] [Top]
有'word','char'和'none',和gtk2是一样的.
----
Where is the RED pill? I want OUT!
[Original] [Print] [Top]
Subject: Re: TextView 的 WrapMode 应该怎样设置呢?
Author: knoppix    Posted: 2004-10-06 23:00    Length: 72 byte(s)
[Original] [Print] [Top]
谢谢,我试了一下,设为"word"很好用,中文能自动分行。
----
Welcome to the world of choices and performance.
[Original] [Print] [Top]
Subject: Re: 关于 Gtk2::TextView ?
Author: knoppix    Posted: 2004-10-06 23:45    Length: 95 byte(s)
[Original] [Print] [Top]
呵呵,apt-get install libgtk2-perl-doc 后,全是例子,包括详细的 TextView 例子,嘿嘿。
----
Welcome to the world of choices and performance.
[Original] [Print] [Top]
« Previous thread
xxx.pl.gz 有没有办法不解压直接运行?
Perl 编 程
4
Next thread »
主文件与子文件间如何传递参数?
     

Copyright © 2007 UNIX Resources Network, All Rights Reserved.      About URN | Privacy & Legal | Help | Contact us
备案序号: 京ICP备05006143    webmaster: webmaster@unixresources.net
This page created on 2008-07-17 04:09:01, cost 0.05987811088562 ms.