|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
3 ?! \" j& I* v; O, @0 z
' U! m5 d3 e2 p6 t" P% W1 q1 c& {$ V1 O, I$ J0 n) o
) s( t- |4 a9 ?8 a- V1 H
首先认识下关于菜单的后缀文件* N# u0 X# }% ]. c
% j6 g& A! ?! P8 ~9 ^ j
| | .tbr | Toolbar | .grb | Group | .gly | Gallery | .ddb | Drop-down | .rtb | Ribbon tab | .csb | Cascade | .abr | Attachment | ( R- }& M) B' U% T, W% Z$ I
8 i) z/ c: E( R% [+ c, ^) K* u
RTB作为菜单ribbon 界面定义的关键,详细信息如下2 n7 I, t. Y H( B- {; q6 S" t, k
# P* g0 _& M- T+ u; J$ O: Y3 | t% R
_* l* s5 d, v, @0 zcustomer_ribbon_tab.rtb
: r- e+ v# o, D!7 w9 o5 O* z/ J" V
! Customer Ribbon Tab3 p: h. E6 _4 L. _$ i
!
3 g6 `- U' M% S/ L! This file will create a new customer tab containing three groups and( E0 J5 i5 n$ \2 f4 o+ g3 K9 e3 a
! one top level button.
% M& H4 g( S4 U6 w4 w, v3 H6 M!
! h- ?* ^7 ]% B! B. v# t! O' W8 [% a/ v2 i9 V& o, v1 }1 }
TITLE Customer Tab
6 U( C' r* d0 _2 a _: @VERSION 170
$ Z5 ~2 O. h7 E- D
% H- ?9 P8 V4 N5 B& Q% X! The first group represents a Ribbon group that references an existing
! `4 w0 O. s; g- O! V- _. m! toolbar with no Ribbon style changes.
# c. \5 q$ I0 B% s# W( d$ B! ( [7 a5 ]7 x- _# F0 J4 `
! This is the quickest way to add existing toolbar content into Ribbon mode.
8 G% N( K( y; g9 F9 y' ]; g1 j!
! E3 V& ^3 L: m9 f. Z7 \! |GROUP customer_toolbar.tbr
+ h2 d. N8 f, h4 t; M. L5 t4 ~! 如果想直接切换tbr 到 rtb,这是最快的
. ]9 ~, n( b c. F/ _* P% x5 U! The second group represents a Ribbon group that references an existing
+ L$ \- |) ]4 f7 e$ J0 |! toolbar with Ribbon specific style changes added to it. There is no difference
; t. n9 v& g7 @" _& h5 G! F, S4 D! in how this toolbar is referenced in the .rtb file compared to the first
$ ]0 m+ V0 M J$ g5 h2 f6 Q! toolbar as a group. The only differences from the first group exist within 6 n) o( T2 i. B4 Q0 l- B- M$ _
! the .tbr file itself.
, m' i0 O8 j0 V% Q!
5 X3 b j5 O1 s5 C8 c+ e2 j7 s! This approach has advantages for customers that will deploy both Ribbon and
) R* ^' H; m; Z5 L$ e( G! Classic Mode customizations since all the content is defined in the .tbr ( o/ P! Q; J$ t" V! p
! file and it will stay synchronized in both modes. Only one set of customizations- T5 S6 Q! b2 a, d; t6 O$ A
! will need to be maintained while still making use of RIBBON_STYLE to
; I7 ~, X0 ]0 c) d* O _3 L/ ]! control the presentation of the buttons on the Ribbon.
9 i4 n, ^$ a3 `7 K!: ~; y% y/ n, x' J( Q: m6 R
GROUP customer_toolbar_alternate.tbr
?0 Y8 ? U. Y4 [ # I$ I& p' S6 W; ]
! The third group represents a Ribbon group that has been created explicitly
/ f) f- n7 j& v, ]+ U Z! as a Ribbon group and will not exist in Classic Toolbar mode. This is the
/ Q- b: H/ Q' }6 c! preferred option since the user will be able to take advantage of all the - L. t& k- X X$ p9 ~# w
! layout styles and containers offered by the Ribbon.
0 D5 V" }7 J* I% J5 V; F2 S!
/ |3 r y$ b: E& d" C, k" s' Y! For customers that will deploy both Ribbon and Classic Mode customizations, / x) o0 |5 \6 A( @$ B Z9 n
! this approach will result in no synchronization and two sets of customizations
5 O2 A. T3 z) |! will need to be maintained. y1 M: E- T5 r- I
!
1 X/ ^/ s5 y% a; l! [5 v! A group can alternatively be defined directly inside the .rtb file by using the$ j, T6 v9 f) h5 y
! keywords BEGIN_GROUP and END_GROUP.
* ^9 o+ r* I6 I!
4 R0 c- T; o6 @GROUP customer_group.grb
: W+ ^7 l& A3 ]/ \: U9 [; N0 z
7 i$ V& C& j3 T, [4 W% @- _4 w" p! Example of a button that is placed directly on the Ribbon without being
7 S* [; x6 M* o/ f, m" C \. x! contained in a group. This is a simple way to add a button to a tab9 n" o9 z9 a6 v7 \3 P3 T
! but is not recommended for many buttons since groups have advantages.
' h9 X% X% g7 l# F& r2 z!
# f* a' b2 j0 L. A$ C! A few advantages of groups:
4 B, L6 Q8 @6 \. i! 1. Easier to move many buttons around together in quick customization. - ~7 H# q8 \1 A1 G, X8 f2 D" K) ?
! For example, MB3 on a group and choose "Add to Left Border Bar".
0 r# ]" t6 I9 R) R% i% m& u! This will move the whole group to a new location. If buttons are
( |+ Q( F* X# Z, A8 q% X) i! not in a group, they need to be moved one at a time.9 ~/ a8 _, g' ?+ }4 |6 K
!" @1 M0 l# y& A- U, _# J8 i
! 2. Provide a label to describe its contents.
; _" o5 P; `5 A" \: R& a!4 i2 c- W- O/ I# q
BUTTON CUSTOMER_BUTTON_1
. S* w+ U- T' L! w1 `4 F3 L1 gLABEL Button1 Directly on Tab
) K& v# ?4 i2 J( F7 {2 P% J1 }3 p. w
部分菜单可以单独写成group gallery 作为对应后缀,重复调用" g& [* \: m% Q( ?: w* u! M
! Example of a gallery defined in a GRB file.
- x0 e6 ~, |* t3 j, v( s! ' D, e7 h1 U+ g' |8 |
! If this gallery is to be used in other places, then it could be
8 y4 ]4 d' B U1 G2 K; v4 \: n0 y9 W! defined in its own gallery (GLY) file and referenced here9 Z7 i" s% }& b: O' q0 p
! Example:
# Q% ]8 H# Q% Q1 i5 A4 b/ H. y S! GALLERY customer_gallery.gly
* P/ u5 a/ K9 o5 R- O: e+ _7 X!0 G% E3 X- g$ y/ m. p
BEGIN_GALLERY CUSTOMER_GALLERY8 f i% I8 F: J
COLUMN_IN_RIBBON 21 l, o/ R1 R( ` Z/ d
COLUMN_IN_POPUP 2" B% ~& o3 @" n4 Q- K
LABEL Gallery6 v: { |) H! {, z8 v- I8 e5 B
GALLERY_STYLE MEDIUM_IMAGE_AND_TEXT
5 N* c; q5 x1 ~0 Y( A! |- N4 a7 S. a T* C5 R, E
BUTTON CUSTOMER_BUTTON_23 y; Q. U+ X D1 `- O; H4 j
4 C! ~: k5 F) ]# H3 k BUTTON CUSTOMER_BUTTON_3
) {# \( q6 B4 \( W I8 W$ J8 n 8 v7 F" \, p7 h* A8 `! u0 T
BUTTON CUSTOMER_BUTTON_4% E- x/ P$ L- u5 D+ Y
! T J& q) ]# p2 Z5 P$ x U, O
BUTTON CUSTOMER_BUTTON_5
7 |9 j8 ^1 a2 x% g/ `& ] " ^# C% W3 z3 p; i, g% P
END_GALLERY
3 E2 J X ?( k, R3 q9 O
$ ~* K* [# T' S; O" B# \: t. [" I |
|