Messages by pstefan

7 topics, 23 messages
Kuix technical support » Touch screen devices

To your second Question, try the following:

Kuix.getCanvas().hasPointerEvents()

 

sincerely

Stefan

Kuix technical support » Touch screen devices

To your second Question, try the following:

Kuix.getCanvas().hasPointerEvents()

 

sincerely

Stefan

Kuix technical support » How to set the languages for Java Frame

Take a look at the Kuix.getMessage() method.

Kuix technical support » capturing keypress in kuix

Where do you want to capture a keypress? From the application or from an custom widget?

On a simple form or in the whole midlet?

Kuix bug report » TextArea inside ScrollPane issues

You have to set the styled-Attribute to true in order to allow the usage of <br/>

<textarea id="TextArea" styled="true">

line 1<br/>

line 2<br/>

line 3

</textarea>

Kuix technical support » Dynamic menu and menuitem generation

As far as I know you can't create the menus at runtime with java code.

There is no setter method for the FirstScreenMenu/SecondScreenMenu variable of the current screen object.

 

But what you can do is to change the visibility of menuitems with the help of a DataProvider.

#1 Create a DataProvider class with some predefined properties:

class myDataProvider extends DataProvider {

public final static String SHOW_MENU_1 = "menu1visible";

private boolean menu1visible = false;

 

 public void setMenu1Visible( boolean v ) {

 menu1visible = v;

dispatchUpdateEvent( SHOW_MENU_1 );

...

}

 

#2 define the menuitems in xml

<menu>

<menuitem>

<_visible>@{menu1visible}</_visible>

%MENU_ITEM_1%

</menuitem>

...

</menu>

 

#3 if you now call the setMenu1Visible() method the menuitem automatically gets hidden or visible, depending on the parameter.

 

 Stefan

Kuix technical support » how to zoom-in a pictue

Kuix doesn't support image resize. You have to write it by your own or use already available j2me solutions.

 

Stefan

Kuix technical support » Capturing keypress in Blackberry

Take a look at the KuixCanvas.setInteractionListener() Method. With this method you can register your class as a listener and get informed about every key press and touch input. Kuix only forwards key presses of known keys (left, right, up, down, 1,2,3,4,5,6,7,8,9,0,...) and not device dependend keys.

The listener forwards both keys and allows you to handle device specific keys.

With it I've already added support for the hardware keyboard of the Nokia N97 to my kuix application. It should also work with a blackberry this way.

ATTENTION!!! The setInteractionListener Method is only available in the subversion repository build and is not included in the 1.1.0 build!!!

Stefan

Kuix technical support » having a short cut key

Should the shortcut call the action of the current screen or should the action been processed by all screens that have been loaded?

 

You can define a shortcut in each xml file in the content-tag with the same action. Each Frame handles the action but doesn't give a return value to its caller. so it should be processed by each frame/screen that has already been loaded.

 

Otherwise you can have a look at the Method KuixCanvas.setInteractionListener. There you can register a listener for key events. just register a key event and throw the action event every time the 0 key is pressed.

If you try to use this solution you have to work with the current kuix version of the subversion repository. It isn't included in the 1.1.0 release.

 

Stefan

 

Kuix technical support » How to put new line in TextArea

I have two solutions in my mind for your problem:

 

#1  Have you tried \n?

 

#2 using a <br/> tag

INFO=1. line 1 <br/>2. line 2

 <textarea class="info-textarea" styled="true">%INFO%</textarea>

 

Otherwise you have to define two language ids for each line.

 

Stefan

Kuix technical support » Gauge inside PopUpBox error

try the following code:

<popupbox>
 <container style="inlinelayout(false,fill)">
  Zoom:
  <gauge value="0.6" visible="true"></gauge>
  test
 </container>
</popupbox>

Popupbox should have gridlayout(1,1) as default layout, so it only shows the first text widget.

Hope this helps!

Greetings from Austria!

Stefan

 

Kuix technical support » scrollpane and scrollbar: urgent..missing dedline :(

Hi!

Remove the layout:inlinelayout(false,top-left) style attribute of the screen-element. A screen-element has gridlayout(1,1) as default layout. It has one cell which will be resized to the full visible screen area.

Inlinelayout doesn't limit the size of the scrollpane to the visible screen area. It will be painted outside the visible area.

Hope it helps!

Stefan

PS: I think you mean Cancel and not Cancal.

Kuix bug report » Double bottom menu on Nokia handsets

I've seen this behaviour too. Most of the time this occured after entering text into a TextField Widget. Kuix uses the LCDUI TextBox element for entering text. Nokia devices disable full screen mode to display the TextBox. After pressing Validate it changes back to full screen mode.

Nokia apparently sends an onSizeChanged event to the midlet when fullscreen mode is disabled. Afterwards it sends the event again when fullscreen is enabled.

I think the reason for this is the clipping mechanism in the paint methods. It fully repaints the current screen in the non-fullscreen size. And after the next onSizeChanged event it just repaints the bottombar and doesn't touch the rest of the screen.

Sincerely

Stefan

Kuix technical support » CSS: changing style in :hover for ListItems

Hi!

I have a list of listitem objects, each containing a simple text widget.

Like the following:

<list style="layout-data:bld(center)" id="list">
 <_renderer>
  <![CDATA[<listitem style="layout:borderlayout" class="category">
    <text style="layout-data:bld(center)">@{name}</text>
   </listitem>]]>
 </_renderer>
 <_items>@{categories}</_items>
</list>

 I've styled them in CSS with the following code:

listitem.Category {
}

listitem.Category text {
 font-size:medium;
  font-style:bold|italic;
  color:red;
}

This works fine. But now I wanted to change the color, the font-size and the font-style attributes if a listitem is focused.

So I've added the following CSS statements:

listitem.Category:hover text {
  font-size:large;
  color:blue;
  font-style:italic;
}

In the case of the color-attribute it works fine! But the font-style and font-size attributes are ignored! Only if an item is focused before the screen has been painted, these attributes are used!

Is this a known and wanted behaviour or a bug?

All I wanted to do is to make the focused listitem a bit bigger (with a large font) than the others! Isn't this possible at all or is there another solution for this?

 

Thanks!

Sincerely

Stefan P

Kuix technical support » Problem with transition and long text on text field
Very nice site!