如何更改数据库表标题的灰色背景? [英] How to change gray background on database table title?

查看:190
本文介绍了如何更改数据库表标题的灰色背景?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过逆向工程从现有数据库创建了一个数据库图表。所以我有一个图表,有几个形状,每个形状代表一个表。默认颜色方案是白色背景,除了每个表的标题,即灰色背景。
如何更改灰色背景?  我已经能够改变图表中每个其他元素的颜色,除了恼人的灰色背景和关系箭头的颜色。

解决方案


如果你想改变实体形状的标题颜色,我建议你尝试以下两种方法。


1。如果您使用的是Visio 2010,请单击主页选项卡>编辑>图层>图层选项>检查颜色


2。使用宏

 Public Sub DoIt()
Dim page As Visio.page
Dim shpsObj As Visio.Shape
Dim i As Integer

Set page = ThisDocument.Pages(1)
For i = 1 to page.Shapes.Count
Set shpsObj = page.Shapes(i)

如果InStr(shpsObj.Name," Entity")= 1则
shpsObj.Cells(" SelectMode")。FormulaForce =" GUARD(IF(User.ManualEdits,1,0)) "
设置shpsObj = shpsObj.Shapes(1)
shpsObj.Cells(" FillForegnd")。FormulaForce =" RGB(77,124,202)"
shpsObj.Characters.CharProps(visCharacterStyle)= visBold
shpsObj.Characters.CharProps(visCharacterColor)= 1
End if
Next i
End Sub

问候,



George Zhao

TechNet社区支持



I created a database diagram by reverse engineering from an existing database. So I have a diagram with several shapes each representing a table. The default color scheme is white background, except for the title of each table, which is gray background. How do I change the gray background?  I've been able to change the color of every other element of the diagram except that annoying gray background and the color of the relationship arrows.

解决方案

Hi,

If you want to change the Entity shapes' title color, I suggest you try the following 2 methods.

1. If you use Visio 2010, click Home tab>Editing>Layers>Layers Options>Check Color

2. Use a macro

Public Sub DoIt()
 Dim page As Visio.page
 Dim shpsObj As Visio.Shape
 Dim i As Integer

 Set page = ThisDocument.Pages(1)
 For i = 1 To page.Shapes.Count
     Set shpsObj = page.Shapes(i)
    
     If InStr(shpsObj.Name, "Entity") = 1 Then
        shpsObj.Cells("SelectMode").FormulaForce = "GUARD(IF(User.ManualEdits,1,0))"
        Set shpsObj = shpsObj.Shapes(1)
        shpsObj.Cells("FillForegnd").FormulaForce = "RGB(77, 124, 202)"
        shpsObj.Characters.CharProps(visCharacterStyle) = visBold
        shpsObj.Characters.CharProps(visCharacterColor) = 1
     End If
 Next i
 End Sub

Regards,

George Zhao
TechNet Community Support


这篇关于如何更改数据库表标题的灰色背景?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆