惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
SegmentFault 最新的问题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Attack and Defense Labs
Attack and Defense Labs
F
Full Disclosure
Vercel News
Vercel News
N
News | PayPal Newsroom
The GitHub Blog
The GitHub Blog
H
Hacker News: Front Page
H
Heimdal Security Blog
P
Privacy International News Feed
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cisco Blogs
L
Lohrmann on Cybersecurity
D
Docker
Recent Announcements
Recent Announcements
Security Archives - TechRepublic
Security Archives - TechRepublic
人人都是产品经理
人人都是产品经理
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Proofpoint News Feed
T
Tailwind CSS Blog
C
Check Point Blog
博客园 - 叶小钗
Google Online Security Blog
Google Online Security Blog
Martin Fowler
Martin Fowler
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
S
Secure Thoughts
博客园 - Franky
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
P
Palo Alto Networks Blog
Latest news
Latest news
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
Last Week in AI
Last Week in AI
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Cyberwarzone
Cyberwarzone
小众软件
小众软件
Cisco Talos Blog
Cisco Talos Blog
Hacker News: Ask HN
Hacker News: Ask HN
T
Threatpost
T
Tenable Blog
P
Privacy & Cybersecurity Law Blog
WordPress大学
WordPress大学

博客园 - 陈锐

微软社区发布会总结(多图杀猫) 微软 Visual Studio 2008 社区发布全国巡展长沙站预报 让微软出钱捐助难民吧 能够下载时改名的文件权限管理 你的博客的性别是什么? 湖南微软开发者俱乐部成立大会顺利召开 湖南微软.NET俱乐部 成立大会事宜 在VB.NET中如何使在Webbrowser中实现标签页中打开新链接 RichTextBox技巧之插入图片(转载) RichTextBox技巧之插入上标和下标(转载) RichTextBox技巧之显示自定义高亮显示(转载) RichTextBox技巧之插入带格式文本(转载) VB 2005的写作进度 再VB 2005的拖放式数据绑定时遇到的问题 有些问题稍微想一下就明白了 写作进度(7月30日) Charles Petzold给撰书人的建议(from 思归的博客) 运行cl.exe编译发生:没有找到 mspdb80.dll 的解决办法 在VSTO 2005下创建的Office CommandBarButton不能定义在过程内
RichTextBox技巧之插入表格(转载)
陈锐 · 2006-09-06 · via 博客园 - 陈锐

Properties - all sizes are in twips
 xLeft - Position of the left edge of the table
 isCentered - Set to True to center the table
 Rows - Sets or returns the number of rows in the table
 Columns - Sets or returns the number of columns in the table
 Row - An Array of Rows (1 to Rows)
 Column - An Array of columns (1 to Columns)
  Column(i).xWidth - Width of the ith column
 Cell - A 2-d Array of Cells (1 to Rows, 1 to Columns)
  Cell(r, c).Contents - Sets or returns the contents of the cell

Methods
 InsertTable(RTB As RichTextBox) - Inserts the table into the RichTextBox
                         at the currrent cursor position.

代码下载地址:
http://www.applevb.com/RTFtable.zip

使用范例:

Option Explicit

Dim RTFtable As clsRTFtable
Private Declare Function LockWindowUpdate Lib "user32" ( _
    
ByVal hwndLock As Long _
As Long

Private Sub Command1_Click()
  
Dim i As Integer
  
Set RTFtable = New clsRTFtable
  
'stop flicker
  Call LockWindowUpdate(RichTextBox1.hWnd)
  
  
For i = 1 To 5
  
With RTFtable
    
'set the size of the table
    .Columns = 3
    .Rows 
= 2
    
'fill the cells
    'Row 1
    .Cell(11).Contents = "Row 1"
    .Cell(
12).Contents = "Column2"
    .Cell(
13).Contents = "Column3"

    
'Row 2
    .Cell(21).Contents = "Row2"
    .Cell(
22).Contents = "R2C2"
    .Cell(
23).Contents = "R2C3"
    
'do we want to center it on the page?
    .isCentered = True
    
    
'insert the table at the current cursor postion
    .InsertTable RichTextBox1
  
End With
  
Next i
    
Call LockWindowUpdate(0)

End Sub