对话框的不同边框。为一个人设定风格
如何为对话框设置不同的边框。用于下、上、左、右边框。 我需要为左下角和右下角设置圆角。但顶角必须是直的。
How I can set different border for Dialog. for bottom, top, left and right border.
I need to set round angle for bottom left and right angles. But top angles have to be direct.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过 DialogContentPane 样式的“图像边框向导”来实现它。
按照以下步骤
为未选择状态创建一个新样式,例如MyDialogContenPane。
确保您从 DialogContentPane 派生出这种新样式
未选择状态,您可以通过转到“派生”选项卡并在组合框中选择“DialogContentPane”来执行此操作。
边框向导'按钮打开一个新窗口。在“创建图像”选项卡下
选择单选按钮“使用文件”,选择在 #1 中创建的图像文件
在此文件对话框中。移至“剪切图像”选项卡,调整
图像并移至“应用到”选项卡,您可以在此处选择列出的组件
'MyDialogContentPane' 并点击“生成”按钮并关闭它
窗户。新边框可以在样式窗口中预览。
注意:如果您希望为所有对话框添加此新边框,而不是创建新样式“MyDialogContentPane”,您可以通过上述步骤重用“DialogContentPane”样式。
我建议您阅读 Shai 的博客文章 'LWUIT 资源编辑器教程第 1 部分' 到第 10 部分。为了更好地了解资源编辑器的特性和功能。
You can achieve it by 'Image Border Wizard' for DialogContentPane style.
Follow these steps
create a new style say MyDialogContenPane for unselected state.
Make sure you derive this new style from DialogContentPane's
unselected state, you can do this by going to 'derive' tab and selecting 'DialogContentPane' in the combo-box.
Border Wizard' button to open a new window. Under the tab 'Create Image'
select radio button 'Use A File', choose the image file created in #1
in this file dialog. Move to tab 'Cut Image' adjust the guides on the
image and move to tab 'Apply To', here you select the listed component
'MyDialogContentPane' and hit 'Generate' button and close this
window. The new border can be previewed in the style window.
NOTE: If you want this new border to be done for all the dialogs than instead of creating new style 'MyDialogContentPane' you reuse the 'DialogContentPane' style with the above steps.
I would recommend you to go through the Shai's blog posts 'LWUIT Resource Editor Tutorial Part 1' till part 10. To better understand the Resouce Editor its features and capabilities.