Button border issue in LWUIT - java-me

I have created button without any border using LWUIT resource editor. I am able to see that button with all my properties set. However, when i am trying to add an image into this button using its image constructor, i am able to see a thick border around my image. I tried changing the button into Label, still image is coming. Please help.

Have you set the button border type as Empty on ResourceEdit? If not, set the button border type as Empty for selected and unselected style on ResourceEdit. It should work.

Related

How to change the style of CComboBox scrollbar in MFC

I want to change the style of scrollbar of CComboBox. I can only change the selected item and background of dropbox, but haven't found any way to change the default style of scrollbar.
And is there any way to get the index of the current item shown on dropbox, so that I can draw my own scrollbar?

Prevent Kendo controls from highlighting required fields in red

I would like to know how avoid the kendo controls have a border in red color when lost focus because I want to show them in red when the user click on save button.
Examplecode

Excel - how to hide value in a chart's datalebel

I have embedded an image to a chart's datalabel. I want to only keep the image and not the value which appears on top of the image.
However I'm not sure how i can get rid of the value to only show the image?
I thought could've set the font colour to transparent but that's not available. I also played around with the number formatter but had no luck?
I'm using Windows/Excel 2010
Thanks
Clicking on one of the data labels once will select all of them, clicking a second time will select only the one you clicked on. Then just hit the delete button. (You should also be able to edit the font/colour in the Home tab.)

Different border for Dialog. Set style for one

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.
You can achieve it by 'Image Border Wizard' for DialogContentPane style.
Follow these steps
Create an image that has your required borders and some empty area in the center.
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.
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.

LWUIT: tabs - how to mark the currently selected tab

I have 4 tabs. Each tab is represented by a button. Those buttons are used to select the currently displayed tab. Each button has an icon and text.
I'd like to highlight the currently selected tab by changing background color and text label color of the corresponding button. I'd like to do it using Theme and Resource Editor.
I created theme and specified unselected, selected and pressed styles for UIID "Tab". My tabs look great in Sun WTK! Fine! But I found that on a real phone the tabs always look like unselected. I tried on Nokia 5800 XPressMusic and C7. Why the difference?
After some experiments I found out the reason - the buttons may be only in 2 states: unselected and pressed. They never be in the selected state. On the emulator when I move to a button using navi keys, it becomes selected.
So, what should I do to mark the current tab?
You can use a few different approaches especially in 1.5.
LWUIT 1.5 has a Tabs component which pretty much does everything for you and is remarkably flexible.
It uses radio buttons on which the method setToggleButton(true) is invoked. Toggle buttons act like radio buttons so when you press a button in the group it stays pressed and is rendered using the ToggleButton style (you can set the UIID to whatever you want). See a sample of using toggle buttons in the font demo portion of LWUIT demo.
An option that will work for older versions of LWUIT is to just set the UIID of the button to a different value when it is pressed (and restore the UIID of the previously selected button to the original value).
I implemented what I needed. Thanks to Shai and his example.
I didn't use theme properties and made all customizations in the code. I did so because I didn't catch how setting unique UIID can help me, since the problem is not in the identifying the UIID for which the props have to be changed, but in identifying the button's style to be changed.
Below some important notes of my solution.
Call addActionListener for the buttons AFTER they have added to the tabs.
When any tab button is pressed, update UNSELECTED styles of the tab buttons. Also you can change their icons.
Call form's repaint() after step 2.

Resources