|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
8 c" K; l/ G4 E E. o6 n
8 ]/ {! M/ y6 j% A1 Q$ t5 F Y$ e. X
3 E! _: Z( ~; {2 D. i; ], Q首先认识下关于菜单的后缀文件, h. g: C# [2 u0 K: o# I( i- f3 q
: a( ~6 k! f2 h/ P4 X; H( s | | .tbr | Toolbar | .grb | Group | .gly | Gallery | .ddb | Drop-down | .rtb | Ribbon tab | .csb | Cascade | .abr | Attachment | : f" p) _! ?* u# f9 A/ |6 V
) Z" n7 N9 |: i& N% C
RTB作为菜单ribbon 界面定义的关键,详细信息如下
- `, @" `0 v& `2 e/ ~' y& T2 o; y9 z
& L, N7 R/ k( S/ L7 A! o
customer_ribbon_tab.rtb
1 b2 r! E/ b! ~% ~! s, N5 [!. A& u* k8 q! S+ b) K1 S- `; X9 H
! Customer Ribbon Tab
+ \& X K& N: P8 W( E) |! : S3 N. m4 s( Y- m- \
! This file will create a new customer tab containing three groups and
/ m+ o6 I! k4 M* @( u! one top level button.
1 z% D; j" i/ `0 e. H!5 V- L) P$ R/ T8 J0 r# }; t
$ t: h4 z" A# z) e8 X
TITLE Customer Tab
. E8 x$ G9 b4 p1 H* o" n' [VERSION 170
: T) O" l' V9 O: k$ N+ i2 y6 a+ ^
! The first group represents a Ribbon group that references an existing 8 W0 U3 l5 F+ K6 }
! toolbar with no Ribbon style changes. , p ^) V0 ~% s2 L5 O
!
2 m- m) `$ _+ g, G S! This is the quickest way to add existing toolbar content into Ribbon mode.; ?. o; w& ]+ c5 U% Q0 a& g" J
!# a$ j" _' c% ]' v7 V" F. I" [
GROUP customer_toolbar.tbr
3 C3 D4 q# ^$ a: L v! y4 Z0 C! 如果想直接切换tbr 到 rtb,这是最快的 1 x o- P- C0 T$ g2 |8 N+ S* M
! The second group represents a Ribbon group that references an existing
3 U6 e* \8 L& B- \7 H' [ [! toolbar with Ribbon specific style changes added to it. There is no difference
% N7 J! V }5 g. i$ c1 |6 r! in how this toolbar is referenced in the .rtb file compared to the first: A. _2 T# Y+ o: v* d
! toolbar as a group. The only differences from the first group exist within + P6 m6 z) g: L8 N+ u% B5 A8 [
! the .tbr file itself.
3 f! C& J' G" G9 E8 M!0 K8 s, N. o0 \& A% w6 t0 F G3 \: U
! This approach has advantages for customers that will deploy both Ribbon and
( A c, d5 ^) D) d! Classic Mode customizations since all the content is defined in the .tbr $ J6 ^+ B. I8 G! G3 ~+ h
! file and it will stay synchronized in both modes. Only one set of customizations/ b, w1 z+ ]! i9 K7 K
! will need to be maintained while still making use of RIBBON_STYLE to
* ?3 h/ D; Y5 m8 C4 ~: V! control the presentation of the buttons on the Ribbon.
0 H4 _' }$ u; J, n# v!9 `$ I& T# y, V" \4 ]( R
GROUP customer_toolbar_alternate.tbr P1 G9 r) u( l' X7 i
+ v3 B% o: |) t7 o# y! The third group represents a Ribbon group that has been created explicitly
( C, E1 B: x# ?/ T! as a Ribbon group and will not exist in Classic Toolbar mode. This is the4 u) w6 x% U5 Z
! preferred option since the user will be able to take advantage of all the 6 r: E7 {- R. L1 j2 ~, X7 Y% P! u# c
! layout styles and containers offered by the Ribbon. ) [ P v$ W8 |
!! ^" h" @0 }- ]8 l: j
! For customers that will deploy both Ribbon and Classic Mode customizations,
% j6 V2 ]: C, O6 L3 ~! v4 U+ _! this approach will result in no synchronization and two sets of customizations
5 [: f' l" N( z9 y$ q( ?7 b! will need to be maintained.% s% d7 K8 N2 Q$ U1 b
!4 i, R0 f3 D2 @' o
! A group can alternatively be defined directly inside the .rtb file by using the# r# p& v j, i6 A4 ]/ z; v3 J1 A( L
! keywords BEGIN_GROUP and END_GROUP.
0 P) U: }3 u5 Y' l- S!
( G7 H! p, E2 _3 mGROUP customer_group.grb
; N; l. r" a2 X( H0 p% Z, i% b- b5 z8 N. E1 O' L3 l
! Example of a button that is placed directly on the Ribbon without being
2 \! W. s( b3 s" v! contained in a group. This is a simple way to add a button to a tab
$ S- Z, L& t) M4 _; |* W! but is not recommended for many buttons since groups have advantages.
% G& b R0 [' @+ y7 W!
3 ?9 @* K6 s: j' n2 F6 O, f; ?! A few advantages of groups:2 v, Z4 H* T# B
! 1. Easier to move many buttons around together in quick customization. 7 ?6 \& L1 {+ s- I$ ~& P! a" `
! For example, MB3 on a group and choose "Add to Left Border Bar".
3 l' R* i5 M) t* e7 Q! This will move the whole group to a new location. If buttons are
9 m+ j/ P& N4 N: I2 _ {! not in a group, they need to be moved one at a time.
" f$ t- Y& _2 \6 \% b1 O!
5 E& r5 z" z6 V4 u0 U! T4 u" \* t! 2. Provide a label to describe its contents.# p4 l( Q1 w0 v; B
!
4 u! I+ Z y/ i% {( GBUTTON CUSTOMER_BUTTON_1$ o/ @$ b3 t+ ^$ t. U1 Q! z5 A9 Q; c
LABEL Button1 Directly on Tab
3 J+ v3 z8 _& u) y& c1 @) H E9 V% v' v. I; r
部分菜单可以单独写成group gallery 作为对应后缀,重复调用0 N4 h2 C4 L/ u0 q- s( ]
! Example of a gallery defined in a GRB file.5 o k4 Y+ M1 U7 T% i0 ^/ p0 Z
!
! ]5 L# M4 r+ ~! If this gallery is to be used in other places, then it could be % v/ B: b3 b- W
! defined in its own gallery (GLY) file and referenced here
- w$ J5 f) |1 z! Example:3 ?4 I! @8 `. r. h( d- ^/ S/ M( s
! GALLERY customer_gallery.gly% |" t( D: V y- v
!& T3 t4 {2 Q" e, k) m( {9 d
BEGIN_GALLERY CUSTOMER_GALLERY" [7 ^! f6 U! y! N9 c; ]) `
COLUMN_IN_RIBBON 2
" b1 g% l& {. C. M9 uCOLUMN_IN_POPUP 2
% {+ J$ j. [9 W( t9 |& d% BLABEL Gallery
& t @7 D! ^9 d6 yGALLERY_STYLE MEDIUM_IMAGE_AND_TEXT
3 ?' V$ t$ I! y4 w. X0 v! U" p J6 P, [1 L
BUTTON CUSTOMER_BUTTON_2/ h( k; p E: R6 O) g* O
/ q8 f- @' \) ~1 o1 k: G6 u% J1 I% g
BUTTON CUSTOMER_BUTTON_39 a b4 I1 V2 z* H* p9 o
* x2 ^- S* P; _" o# {. T% K
BUTTON CUSTOMER_BUTTON_4) G! u+ V+ d: F' w% {
4 N; S( a$ O3 S BUTTON CUSTOMER_BUTTON_59 a1 l. ~$ I' ^
3 a. h3 v+ Y# ^/ d7 M& R
END_GALLERY$ G T' D: G4 A
I: j, L+ {9 R# B |
|