Different border for Dialog. Set style for one

408 views Asked by At

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.

1

There are 1 answers

2
Vimal On BEST ANSWER

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.