Jump to content

Как сделать в ленте большую кнопку без подписи сбоку от двух рядов маленьких кнопок без подписей?


Recommended Posts

Собственно, хотел сделать выпадающее меню слоёв на всю ширину панельки, а под ней большую кнопку Диспетчера слоёв и следом два ряда маленьких кнопок. Маленькая кнопка не устраивает - очень часто тыкаю, большая съедает ширину панельки слоёв - слишком жирно. Но выяснилось, что RibbonRowPanel может делить панельку только по всей высоте, т.е. можно 3 элемента RibbonRowPanel расположить рядом, но нельзя их располоить рядом под элементом RibbonRow. Сделал так:

455582273_.png.cc48b4cb1347539b46007a7573fc83c1.png

Кривовато, но работает. Может есть вариант сделать нормально? В идеале, я бы слева сделал на высоту двух рядов.

Спойлер

    <RibbonPanelSource UID="ID_PanelLayers" Text="Слои" ResizePriority="100" HiddenInEditor="false" KeyTip="LL" __use="true">
      <Name xlate="true" UID="ID_NAME_Layers">Слои</Name>
      <RibbonRowPanel UID="RBN_200_A6ED2" ResizeStyle="None" ResizePriority="100">
        <RibbonRow>
          <RibbonControl UID="ID_RBN_CONTROL_LAYERCONTROL" Id="insp:General.Layer" Text="Поле со списком для управления слоями" MinWidth="320" KeyTip="LA" />
        </RibbonRow>
        <RibbonRow>
          <RibbonCommandButton UID="RBN_00017429" Id="RibbonCommandButton" Text="Откл" ButtonStyle="SmallWithoutText" MenuMacroID="ID_LAYOFF" KeyTip="LO" />
          <RibbonCommandButton UID="RBN_00017428" Id="RibbonCommandButton" Text="Заморозить" ButtonStyle="SmallWithoutText" MenuMacroID="ID_LAYFRZ" KeyTip="LF" />
          <RibbonCommandButton UID="ID_RBN_CMDBTN_LAYLCK" Id="RibbonCommandButton" Text="Блокировать" ButtonStyle="SmallWithoutText" MenuMacroID="ID_LAYLCK" KeyTip="LK" />
          <RibbonCommandButton UID="RBN_00017425" Id="RibbonCommandButton" Text="Новый слой" ButtonStyle="SmallWithoutText" MenuMacroID="NewLayer" resolved="1" />
          <RibbonCommandButton UID="RBN_00017420" Id="RibbonCommandButton" Text="Сделать текущим" ButtonStyle="SmallWithoutText" MenuMacroID="ID_Laymcur" KeyTip="LC" />
          <RibbonCommandButton UID="RBN_00017425" Id="RibbonCommandButton" Text="Изолировать" ButtonStyle="SmallWithoutText" MenuMacroID="ID_LAYISO" KeyTip="LS" />
          <RibbonCommandButton UID="ID_RBN_CMDBTN_LAYCUR" Id="RibbonCommandButton" Text="Как у текущего слоя" ButtonStyle="SmallWithoutText" MenuMacroID="ID_LAYCUR" KeyTip="CU" />
          <RibbonCommandButton UID="ID_RBN_CMDBTN_COPYTO" Id="RibbonCommandButton" Text="Копировать объекты в новый слой" ButtonStyle="SmallWithoutText" MenuMacroID="ID_COPYTO" KeyTip="CPY" />
        </RibbonRow>
        <RibbonRow>
          <RibbonCommandButton UID="ID_RBN_CMDBTN_LAYON" Id="RibbonCommandButton" Text="Включить все слои" ButtonStyle="SmallWithoutText" MenuMacroID="ID_LAYON" KeyTip="LN" />
          <RibbonCommandButton UID="ID_RBN_CMDBTN_LAYTHW" Id="RibbonCommandButton" Text="Разморозить все слои" ButtonStyle="SmallWithoutText" MenuMacroID="ID_LAYTHW" KeyTip="LW" />
          <RibbonCommandButton UID="ID_RBN_CMDBTN_LAYULK" Id="RibbonCommandButton" Text="Разблокировать" ButtonStyle="SmallWithoutText" MenuMacroID="ID_LAYULK" KeyTip="UL" />
          <RibbonCommandButton UID="RBN_00017422" Id="RibbonCommandButton" Text="Копировать свойства слоя" ButtonStyle="SmallWithoutText" MenuMacroID="ID_LAYMCH" KeyTip="LM" />
          <RibbonCommandButton UID="" Id="RibbonCommandButton" Text="Предыдущее состояние слоев" ButtonStyle="SmallWithoutText" MenuMacroID="LayerP" KeyTip="" resolved="1" />
          <RibbonCommandButton UID="ID_RBN_CMDBTN_LAYMRG" Id="RibbonCommandButton" Text="Объединить" ButtonStyle="SmallWithoutText" MenuMacroID="ID_LAYMRG" KeyTip="MR" />
          <RibbonCommandButton UID="ID_RBN_CMDBTN_LAYWLK" Id="RibbonCommandButton" Text="Обход слоев" ButtonStyle="SmallWithoutText" MenuMacroID="ID_LAYWLK" KeyTip="WL" />
          <RibbonCommandButton UID="ID_RBN_CMDBTN_LAYDEL" Id="RibbonCommandButton" Text="Удалить" ButtonStyle="SmallWithoutText" MenuMacroID="ID_LAYDEL" KeyTip="DE" />
          <RibbonCommandButton UID="ID_RBN_TOGGLEBTN_LAYER" Id="RibbonCommandButton" Text="Слои" ButtonStyle="LargeWithoutText" MenuMacroID="Layer" resolved="1" KeyTip="LP" TopJustyfy="True" />
        </RibbonRow>
      </RibbonRowPanel>
      <RibbonPanelBreak Id="RibbonPanelBreak" />
      <RibbonRow>
        <RibbonCommandButton Id="RibbonCommandButton" Text="Диспетчер конфигураций слоев" ButtonStyle="SmallWithText" MenuMacroID="layerstate" resolved="1" />
      </RibbonRow>
      <RibbonRow>
        <RibbonControl UID="" Id="insp:Layer States" Text="Конфигурации слоёв" MinWidth="180" KeyTip="" />
      </RibbonRow>
      <RibbonRow>
        <RibbonControl UID="" Id="insp:Layer Groups" Text="Группы слоёв" MinWidth="180" KeyTip="" />
      </RibbonRow>
    </RibbonPanelSource>

 

Горшочек - не вари. Пошёл спать.

Edited by Kreator
код в виде кода
  • Like 2
Link to comment
Share on other sites

Добрый день!

Большая кнопка занимает три строки, поэтому разместить её под выпадающим меню невозможно, только если рядом отдельной группой.

  • Like 1
Link to comment
Share on other sites

Прошу прощения, ввела вас в заблуждение. Три строки занимает большая кнопка с текстом. А вот просто большая кнопка и большая кнопка с горизонтальным текстом (новинка! ButtonStyle="LargeWithHorizontalText") занимают по полторы строки:

image.png

 

Таким образом, можно например первой строкой сделать поле со списком управления слоями, с изменением его ширины, я вижу, вы разобрались. Второй строкой - наиболее часто используемые кнопки. Отдельными столбцами реже используемые, а самые редкие - в выпадашку:

image.png

  • Like 3
Link to comment
Share on other sites

@Hellen Спасибо. Но тут пространство панельки делится всё равно сначала по вертикали, а потом по горизонтали

516800076_.png.7f1ca498e0fcc61f144ebcbc95791e52.png

У меня немного другой вариант - сначала по горизонтали, а потоп по вертикали. Цель - сделать выпадающее меню Слои максимально широким. По высоте кнопка подходит, но можно ли её так поставить, как я хочу.

2081420769_.png.a151a7f3c0e2342e85346cda409542d9.png

 

Edited by Kreator
потерял слово
Link to comment
Share on other sites

Я поняла, что вы имеете в виду. К сожалению, поставить большую кнопку без надписи вниз нельзя.

Кнопки имеют такие размеры: Большая с текстом - 1, все малые и выпадашки - 1/3, большие без текста и с горизонтальным текстом - 1/2. Таким образом, два ряда малых кнопок != одной большой без текста, поэтому в одну линию не выстроятся.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Tell a friend

    Love Официальный форум компании Нанософт Разработка? Tell a friend!
×
×
  • Create New...