Codename One: How to increase height of dialog - codenameone

I have developed app using Codename one.I want to set specific height of dialog because my text overidden while displaying message in dialog body .what should I do for that?
Thanks in Advance?
I have added image in which first image is original image and second one is cut image which is displaying on screen while using infinite progress bar. my code is "Dialog ipDialog = new InfiniteProgress().showInifiniteBlocking(); ipDialog.Dispose()" I want whole image on screen like original image.
can you help me to solved this ?

You can use the Dialog show method that accepts int values to determine the distance from the edges. But normally this is a matter of the text sizing and dialog construction.
Also make sure you are showing the Dialog from the EDT thread.

Related

How to get Codename One Form feature vertical scroll?

My Codename One app features a Form with 3 SpanLabels containing text and one Container in LayeredLayout with an image and an overlay.
this.add(BorderLayout.NORTH, spanLab1);
this.add(BorderLayout.CENTER, imageCont);
this.add(BorderLayout.SOUTH, BoxLayout.encloseY(spanLab2, spanLabl3));
This yields to the following:
This is not satisfactory as the image (that appears in the center and should be CN1 icon) is not scaled but cut because it is not possible to scroll down.
I tried to force the Form to be scrollable (this.setScrollableY(true)) without success.
Did I make a mistake somewhere, for example should all my content be placed in the BorderLayout.CENTER since according to the documentation the NORTH position is dedicated for the title and the SOUTH one for an optional menu bar (I tried this without success)?
Or should I show a Dialog instead (that offers Y-Scroll out of the box) ? What is actually the proper way to show all my (long) content with no picture cut or text overlaping ?
EDIT December 22nd 2016
As #Tizbn wrote the Form's ContentPane has to be in Vertical BoxLayout. So the call to the parent constructor has to be written :
super(new BoxLayout(BoxLayout.Y_AXIS));
Thank you very much for any help!
Vertical Scroll is disable in BorderLayout . For that BoxLayout with Y-axis can be used and make setScrollableY(true) in the Boxlayout. Hope it will help .

Codename One - span label did not show all content

You can see the picture I attached, before the line "List of schools", it didn't show all of the contents on my span-label. Please help me to how to solve this problem.
Make sure one of your roots isn't a flow layout and that the UI is based on a scrollable box layout Y to give it the right size.

Repainting container in Codenameone

I am working on Creating some objects in a container withing a from in codenameone. I am moving objects every 2 seconds, the objects are moving but the container is unable to display the objects. It displays only when i click the sidemenubar and it shows objects on the container. If SideMenuBar is closed , it again disappears.
I am posting 2 images which describes the problem.
I used repaint(), revalidate() and also show() but it is showing the same thing. Please Help!!
Its hard to tell what you are doing but I guess you just paint the green background on top of these images that you draw at some point. The side menu bar converts the form to a screenshot when sliding out so you are seeing a frozen state of the form not the actual view.

Navigate through big image

I have a big image with coordinate points.
I need to navigate through these points by pressing onscreen buttons.
Only a part of image is seen on the screen at once (shows your location).
By pressing arrow button the view moves to the next part of the same image.
This example looks good.
Please, suggest any way to implement this functionality in Codename One App
Thank You.
You can use the Map component but you can place any image as a label icon within a scrollable container and just let the user use the touch/keys to scroll.

GtkVBox inside GtkFixed panel

I'm trying to develop a GTK desktop application.
I want to display an image and make some clickable areas on the image. For this reason, I'm using GtkFixed container to put the image and clickable areas(GtkEventBox is used for areas). After the user clicks on a GtkEventBox, I want to display a box in the clicked area. For this reason, I have thought to use GtkVBox to make a box to display.
The problem is that GtkVBox is not visible inside a GtkFixed container parent. So I am stuck at that point. Is it possible to use GtkVBox inside GtkFixed? If not, what is the proper method of doing this job?
I found the answer, it was a mistake that I used gtk_widget_show to make container visible instead of gtk_widget_show_all. It works now

Resources