Kuix - Scrollbar in a screen

1 message, no reply - 375 views

Hi everyone, 

I'm new in J2ME and Kuix development and I'm trying to put a scrollbar in a window that's receiving new data from my dataprovider but I don't know how to make it appear. 

I'm using kuix 1.1.0 and kutil 1.0.3 with j2me 3.0. 

I have a vector that contains a lot of strings which I concatenate and then it's sent to the xml that's painted in my screen, but only part of it is shown without any scrollbar. This situation makes imposible to see the whole content that I need to show. 

screen.xml :::

<screen style="align:top;layout:inlinelayout(false,fill)">

<textArea styled="true">

@{myProperty}

</textArea>

</screen>

 

I use textArea because I'm using HTML like text: example, "MyTitle <br/> <text> My Content </text>"

 

screen.java

//This line is inside the constructor

proveedor = new DataProvider();

 

public void onAdded() {

Screen screen = Kuix.loadScreen("screen.xml", proveedor);

//Starts the provider's thread

proveedor.start();

    // Set the application current screen

    screen.setCurrent();

}

I tried to use ScrollPane but I didn't know how to use it in my case. 

In the DataProvider I make a big String that looks like this: 

<b>A question</b><br/><br/><text>An answer with more than one line</text>

<b>A question 2</b><br/><br/><text>An answer with more than one line</text>

<b>A question 3</b><br/><br/><text>An answer with more than one line</text>

etc...

 

After that, I make a call to repaint the screen with this:

myProperty = All the previous String

dispatchUpdateEvent("myProperty");

Kuix.getCanvas().repaintAsSoonAsPossible();

 

I get in my Screen only two or three questions, but no scrollbar to be able to see the whole text

Can anyone give me an advise?