How set layout for Dialog? - java-me

I tried to use
dialog.setLayout(BoxLayout.Y_AXIS);
but it doesn't work.
How can I set the layout?

Use this:
dialog.setLayout(new BoxLayout(BoxLayout.Y_AXIS));

Related

Android UI: Button with shape inside?

I need to create a button that looks like this:
button
I was hoping to create it without using images. To create the pink part, I wanted to use a drawable.
How can I include a shape drawable within a button?
You can create a Layout, set background color for that layout as you wish. In that layout add two textviews. Set background for one layout pink. add another under the first textview. Then you can set onClickListener on layout. It'll work same as that of button and it'll be easy to change colors and text programatically.
Try using an ImageButton and setting android:src to point to your ShapeDrawable resource.

How to Set BadgeElement Background Color?

I am using BadgeElement(s) in Xamarin iOS in my custom made slideout nav menu.
I just would like to set the background color (like with StyledStringElements), does anyone know how?
Try overriding the BadgeElement class or use an own created view and an Uiviewelement

ScrollBar in LWUIT

How can I edit the style of the listsĀ“ scrollbar?
I want to modify its width, mainly.
To change his colors I use the UIID ScrollThumb, is this correct?
Thanks
#Shai Almog shows me how to edit the ScrollBar.
Using the UIIDs "Scroll" and "ScrollThumb", I can customize my appsĀ“ scroll. Modifying padding/background I can control the width.
There are so many examples in the LWUIT svn.

How to set the Z-Index of a Label Control in Code?

How to set the Z-Index of a Label control in Code?
I could see the option in XAML's property, but in code, I can't find something like:
Label1.SetZIndex // don't have this..
I looked through the Intellisence option, but I found nothing related to Z-index.
I am placing a Label on a TextBox.
use Canvas.SetZIndex

C#: Set font for UserControl (WinForm)

I got a UserControl and some comboboxes in it. When I set new font for the UserControl, the font in comboboxes were also changed (this is expected) but the texts in them were selected!!
How can I prevent text selection in comboboxes?
Hope to find some solution soon.
Thanks in advance!
maybe you can post your xaml here.
If your bindings have something like this:
IsSynchronizedWithCurrentItem="True"
change it to false to prevent text selection.

Resources