对话框的不同边框。为一个人设定风格

发布于 2024-12-18 23:44:31 字数 59 浏览 2 评论 0原文

如何为对话框设置不同的边框。用于下、上、左、右边框。 我需要为左下角和右下角设置圆角。但顶角必须是直的。

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无法言说的痛 2024-12-25 23:44:31

您可以通过 DialogContentPane 样式的“图像边框向导”来实现它。

按照以下步骤

  1. 创建一个具有所需边框和中心空白区域的图像。
  2. 在资源编辑器中的活动主题下打开“.res”文件
    未选择状态创建一个新样式,例如MyDialogContenPane
    确保您从 DialogContentPane 派生出这种新样式
    未选择状态,您可以通过转到“派生”选项卡并在组合框中选择“DialogContentPane”来执行此操作。
  3. 打开此样式的窗口后,移至“边框”选项卡,然后单击“图像”
    边框向导
    '按钮打开一个新窗口。在“创建图像”选项卡下
    选择单选按钮“使用文件”,选择在 #1 中创建的图像文件
    在此文件对话框中。移至“剪切图像”选项卡,调整
    图像并移至“应用到”选项卡,您可以在此处选择列出的组件
    'MyDialogContentPane' 并点击“生成”按钮并关闭它
    窗户。新边框可以在样式窗口中预览。

注意:如果您希望为所有对话框添加此新边框,而不是创建新样式“MyDialogContentPane”,您可以通过上述步骤重用“DialogContentPane”样式。

我建议您阅读 Shai 的博客文章 'LWUIT 资源编辑器教程第 1 部分' 到第 10 部分。为了更好地了解资源编辑器的特性和功能。

You can achieve it by 'Image Border Wizard' for DialogContentPane style.

Follow these steps

  1. Create an image that has your required borders and some empty area in the center.
  2. Open your '.res' file in Resource Editor, under your active theme
    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.
  3. With this style's window open move to 'border' tab and click the 'Image
    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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文