|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
. k+ Q& \: y# D' w, d. K- Q: z7 H' T. o0 S
8 t/ M6 h1 i7 g+ _- p# N2 j
! J. s/ ?8 Z2 n. V' ]3 q首先认识下关于菜单的后缀文件
0 g' G- s- K' s; |
6 Z* E: e1 y0 W2 \ | | .tbr | Toolbar | .grb | Group | .gly | Gallery | .ddb | Drop-down | .rtb | Ribbon tab | .csb | Cascade | .abr | Attachment |
* s! T& N; \! s' t9 k. w% v6 p& F! y7 p N1 _' U( f0 u8 p2 m
RTB作为菜单ribbon 界面定义的关键,详细信息如下
* R+ K6 O6 B7 ]4 e
0 |* L* u: u6 G& \# Z1 p. I- {+ U) i* u- a E" Y
customer_ribbon_tab.rtb
3 P! ^4 ~2 @5 {4 T& C) S!( ~8 d) ^% h) u2 L6 @5 f8 Y
! Customer Ribbon Tab/ C/ `+ c6 P Z! ~+ w4 I
!
& z1 `. W3 m7 K- z! E! This file will create a new customer tab containing three groups and& O* R# X4 t8 z! Q
! one top level button.$ C' ?3 D$ o$ m ^
!
" i, y0 P4 f3 o* m' y. x' f9 V6 d# s. g1 O6 j5 o
TITLE Customer Tab$ E" |5 s+ ?! \/ I5 Z: z* y- H2 k
VERSION 170! i& f) ]6 ^2 y, H. i
4 O5 Z: o6 W) R4 H- y+ W/ k
! The first group represents a Ribbon group that references an existing
* G1 Z3 G0 P8 R" j k- n+ N! toolbar with no Ribbon style changes. 8 A, I* n; v1 P3 b4 I9 N) t
!
; ?! E, w; q4 R7 ~% n4 |! This is the quickest way to add existing toolbar content into Ribbon mode.6 r! A0 |/ z" G0 ?
!
# I, F+ l7 {, ~& m+ o+ NGROUP customer_toolbar.tbr; k# Q7 W) @ r* ?
! 如果想直接切换tbr 到 rtb,这是最快的 1 Q. p3 V) ?) [' I+ o
! The second group represents a Ribbon group that references an existing
) b! m) c- {2 D7 Y5 j! toolbar with Ribbon specific style changes added to it. There is no difference* X/ N, x) l: F+ [, `" r
! in how this toolbar is referenced in the .rtb file compared to the first+ }% r6 G9 m3 P; s, C7 f
! toolbar as a group. The only differences from the first group exist within : ?$ j5 Z! V, G2 d
! the .tbr file itself.
5 D* @: n* a& q# g% H; e!
5 ?+ c- N6 P. A/ [! This approach has advantages for customers that will deploy both Ribbon and/ r9 V4 Y. J7 l
! Classic Mode customizations since all the content is defined in the .tbr + \* D- `4 V/ [2 @3 h
! file and it will stay synchronized in both modes. Only one set of customizations0 Y3 P! z7 J' G4 J+ n( M6 `
! will need to be maintained while still making use of RIBBON_STYLE to
6 m" b* Z6 {/ z6 V- C! control the presentation of the buttons on the Ribbon.
, x1 f% G8 h( Y3 M r( k!. }$ n6 U- z- I" c4 s+ j- }
GROUP customer_toolbar_alternate.tbr, ~1 J; x+ g& m! ^
5 N) |4 j" x$ r U2 c" a& u
! The third group represents a Ribbon group that has been created explicitly
. I! k5 \0 Y9 s G$ u! o4 u! as a Ribbon group and will not exist in Classic Toolbar mode. This is the: ]- i; d! L; ]/ S# c
! preferred option since the user will be able to take advantage of all the , D: e: [1 C% K; a# w7 z( t
! layout styles and containers offered by the Ribbon.
, m* d; J& F4 _2 ~4 f) ]!
O5 W5 \" t: v& E) k! For customers that will deploy both Ribbon and Classic Mode customizations, 7 }: Q7 o9 i _) l" c& W5 j
! this approach will result in no synchronization and two sets of customizations * a8 r; e* t( q0 Q, e! t
! will need to be maintained.: F- ~5 _* S1 N8 {. f5 ^- R
!9 J: O" }# \3 T- P% n
! A group can alternatively be defined directly inside the .rtb file by using the* p4 K3 v% q0 F" t$ X6 b4 B7 Q
! keywords BEGIN_GROUP and END_GROUP. , f+ K2 D, K# o; a7 U2 \( B$ J
!6 H4 c2 ^: i' y/ a" Z
GROUP customer_group.grb' T# f: h$ u5 V9 L+ q3 W
9 i$ l% @+ {* H8 C
! Example of a button that is placed directly on the Ribbon without being. @0 k: m! Q* F5 n0 V
! contained in a group. This is a simple way to add a button to a tab
5 W: d+ o8 } t* [7 J3 p! but is not recommended for many buttons since groups have advantages.9 b2 ~+ E2 e7 v; g+ z) K
!
) C v- x7 g/ @+ q! A few advantages of groups:, H! H$ A Q2 D% g) n7 n( _/ L
! 1. Easier to move many buttons around together in quick customization. + O5 U# y8 h1 @" Y ` P& M5 v
! For example, MB3 on a group and choose "Add to Left Border Bar".
. d0 {( b+ F9 V; d! N! This will move the whole group to a new location. If buttons are $ g' `; ?1 B! e1 v
! not in a group, they need to be moved one at a time.
! A" s2 T6 Y+ q0 r v!
1 B8 H- L- `8 ]! 2. Provide a label to describe its contents.
$ ]3 Q+ P3 W4 r2 U0 k!
3 I' [) ]+ N+ N4 CBUTTON CUSTOMER_BUTTON_1
! H1 a& ^8 I- p+ k$ q( nLABEL Button1 Directly on Tab5 [2 D- u& w3 p3 Z, n: l
9 o8 T# L" J* F
部分菜单可以单独写成group gallery 作为对应后缀,重复调用
6 d3 S1 z7 C* h' u ?. n; |! Example of a gallery defined in a GRB file.; e) p i U. d4 @0 m
!
m: e8 ~& f5 K, q( X5 k5 p! If this gallery is to be used in other places, then it could be : E4 w4 |& r. T: W6 q$ d. R, d$ w
! defined in its own gallery (GLY) file and referenced here
* ?! P o9 @9 u! |; ^1 d! Example:+ [/ }1 ^" E9 J: ~$ K% v% [; ]
! GALLERY customer_gallery.gly
& p/ O! ^- O+ m# U) |1 l!' k9 J" ~3 T. B8 U* C1 L# [
BEGIN_GALLERY CUSTOMER_GALLERY7 y( S* \5 Q2 c+ D, e8 m, \4 K, I# _
COLUMN_IN_RIBBON 2
9 E$ B& \, B8 g" ACOLUMN_IN_POPUP 27 f5 i3 w6 l. z3 V0 {1 ~
LABEL Gallery
1 b& t2 w$ o3 T: S2 [GALLERY_STYLE MEDIUM_IMAGE_AND_TEXT
: `% T% {( @) d1 ^
0 q; u, O# ]7 t BUTTON CUSTOMER_BUTTON_2
- P$ s }2 c. o7 _
N/ F4 F$ l+ u, B BUTTON CUSTOMER_BUTTON_3
# J1 c7 ?+ [/ G
, v3 T7 Y3 g2 T8 Z# z4 Y% W! q BUTTON CUSTOMER_BUTTON_48 g. K% ^0 E# V1 ?6 B- B
$ H" U- v; W! I0 m% } BUTTON CUSTOMER_BUTTON_5
( {, t( z/ y7 o& v 0 M. r: E& e, v" M1 O' K7 \8 g7 }
END_GALLERY
! p; u! T8 o% Q
0 N8 u- d4 `8 F |
|