Kreator Posted April 11, 2021 Report Share Posted April 11, 2021 (edited) Собственно, хотел сделать выпадающее меню слоёв на всю ширину панельки, а под ней большую кнопку Диспетчера слоёв и следом два ряда маленьких кнопок. Маленькая кнопка не устраивает - очень часто тыкаю, большая съедает ширину панельки слоёв - слишком жирно. Но выяснилось, что RibbonRowPanel может делить панельку только по всей высоте, т.е. можно 3 элемента RibbonRowPanel расположить рядом, но нельзя их располоить рядом под элементом RibbonRow. Сделал так: Кривовато, но работает. Может есть вариант сделать нормально? В идеале, я бы слева сделал на высоту двух рядов. Спойлер <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 April 11, 2021 by Kreator код в виде кода 2 Quote Link to comment Share on other sites More sharing options...
Hellen Posted April 12, 2021 Report Share Posted April 12, 2021 Добрый день! Большая кнопка занимает три строки, поэтому разместить её под выпадающим меню невозможно, только если рядом отдельной группой. 1 Quote Link to comment Share on other sites More sharing options...
Hellen Posted April 12, 2021 Report Share Posted April 12, 2021 Прошу прощения, ввела вас в заблуждение. Три строки занимает большая кнопка с текстом. А вот просто большая кнопка и большая кнопка с горизонтальным текстом (новинка! ButtonStyle="LargeWithHorizontalText") занимают по полторы строки: Таким образом, можно например первой строкой сделать поле со списком управления слоями, с изменением его ширины, я вижу, вы разобрались. Второй строкой - наиболее часто используемые кнопки. Отдельными столбцами реже используемые, а самые редкие - в выпадашку: 3 Quote Link to comment Share on other sites More sharing options...
Kreator Posted April 14, 2021 Author Report Share Posted April 14, 2021 (edited) @Hellen Спасибо. Но тут пространство панельки делится всё равно сначала по вертикали, а потом по горизонтали У меня немного другой вариант - сначала по горизонтали, а потоп по вертикали. Цель - сделать выпадающее меню Слои максимально широким. По высоте кнопка подходит, но можно ли её так поставить, как я хочу. Edited April 14, 2021 by Kreator потерял слово Quote Link to comment Share on other sites More sharing options...
Hellen Posted April 14, 2021 Report Share Posted April 14, 2021 Я поняла, что вы имеете в виду. К сожалению, поставить большую кнопку без надписи вниз нельзя. Кнопки имеют такие размеры: Большая с текстом - 1, все малые и выпадашки - 1/3, большие без текста и с горизонтальным текстом - 1/2. Таким образом, два ряда малых кнопок != одной большой без текста, поэтому в одну линию не выстроятся. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.