Messages by sahrear

12 topics, 24 messages
Kuix technical support » Text scroll

Hi,

I have one textfiled under table layout about 60% of the screen and a textarea about 30% of the screen. As i type in the textfield it scrolls horizontaly over the screen but i want to see it as vertically as i keep putting user input. Moreover whatever is writen in the textfield i'm showing it in textarea with different font color. I want to show all these as vertically scrollabe in the screen. Please help me how to show it.

below is my code:

<screen title="Layout!!">
    <container style="layout:borderlayout">
        <container style="layout:tablelayout">
            <container id="10percent" style="span: 2 1; weight: 1 .10;border:1;border-color:blue">
            To:
                <textfield maxsize="14" style="align:fill-left;">
                </textfield>
            </container>
            <break/>
            <textfield id="message" onfocus="setColor" style="span: 2 1; weight: 1 .60;border:1;border-color:green;bg-color:#408080">
            Write Message here..
            </textfield>
            <break/>
            <textarea id="preview" style="span: 2 1; weight: 1 .30;border:1;border-color:red">30%
            </textarea>
        </container>
    </container>
    <screenfirstmenu>Send</screenfirstmenu>
    <screensecondmenu>Insert
        <menuPopup>
        <menuItem onAction="setColor">
            Color
        </menuItem>
        <menuItem onAction="setEmoticons">
            Emoticons
        </menuItem>
    </menuPopup>

    </screensecondmenu>
</screen>

Kuix technical support » different font color

Shouldn't i extend TextField? or FocusableWidget? If i want to override what is this parameter byte type?

Kuix technical support » different font color

Hi tofu... what is the byte type here?

Kuix technical support » different font color
Hi,

Thanks you much for your response, but i'm getting confused more and
more. Can you please give me a guideline? what i'm trying to do is:

1) Trying to make a simple SMS application

2) With 2 softbuttons in the bottom. Left one for 'send'  right one
for inserting color

2) When the user will try to write a new message then he will get two
textfield. Such as:
To:<textfield></textfield>
Message:<textfield></textfield>

3) When he focuses the textfield for To: then he enters the receivers number.
4) Then he focuses to message textfield to write the message. Here
comes my requirements:
- Every times he selects the textfield he gets the default phone
screen to write text. If he doesn't "insert" color then it writes in
default.
-if he inserts color (say red) then after writing the message in
default phone screen, when it comes back to textfiled (focused) then
it shown the entered text in red
-same way, if he inserts the color blue,then after writing the text
when textfield is focused (or any other way) then entered text will be
blue.

So thats all i wanted to do.. so can you please suggest? how should i
approach to do this? what i understand is that, to take user input i
must use some text holder kind of thing like textfield (like a
form)... so i took textfield.. please give me a guideline..

What i understood from your mail that, it is not possible to render
different font color in textfield.. so what i need to do is to take
the string in one color (default) in textfiled and use something like
preview and render the texts in different color possibly in "screen"
and then try to send.. i understand that on receiver side there should
be something to parse the tagging (<blue>blue text) and show it in
different color.

Please guide whether i''m in right track or not?

Regards
Sahrear

Kuix technical support » different font color

If i try nagkumar way of overridning paint() will it work?

Nagkumar, did you try it ever bro?

Kuix technical support » different font color

Thanks tofu.. but my requirment is kind of like that as Nagkumar pointed..actually i believe i need a textfield.. for example:

 

String color1 = red;

String color2 = green;

textfield tfield = mew textField();

Text text1 = new Text();

text1.setAttribute("style", "color:"+color1);

tfield.add(text1);

Text text2 = new Text();

text2.setAttribute("style", "color:"+color1);

tfield.add(text2);

 

and finally

screen.add(tfield);

 

is it possible to do something like above? Or i can only show it in "screen" not in textfield? Please suggest, if it is not possible then i need to find out an work around.. thanks in advance..

Kuix technical support » different font color

Hi.. is it possible to have different font color in one screen? For example:

       Screen screen = new Screen();
       // create a Text widget to show some basic text
        Text text = new Text();
        text.setAttribute("style", "color:red");
        // set the Text of your object to "Hello World!"
        text.setText("Hello World!");
        screen.add(text);
        Text text1 = new Text();
        text1.setAttribute("style", "color:blue");
        text1.setText("is the world blue?");
        // add the text to the screen
        screen.add(text1);

        // set the application current screen 
        screen.setCurrent();

 

Or is ther any other way to have different font color in one text area?

Kuix technical support » How to use javacode and XML/CSS together?

Hi..i'm new in Kuix.. just started 3 days ago.. i just created the HelloWorld by Kuix (using tutorial and XML/CSS). As i can see in the XML that container is an element of Screen. I wanted to know how to add that using javacode? However i guess i can set the attributes with screen.setAttribute(arg0, arg1).. but can you please help ho to add the elements? There are more elements like screenFirstMenu and screenSecond menu.

By any chance is there any javacode for the HelloWorld tutorial showed here with XML & CSS?

 

please help..

Sahrear

Kuix technical support » can not run the HelloWord in Tutorial 1

Dear All i'm new Kuix, i just downloaded all requeired files and integrated and just tried the HelloWorld in Tutorial 1, but it failed because can not find the symobl Screen and followed by other errors. I have followed all the steps mentioned in tutorial 0. Exact error is below:

 

Compiling 1 source file to E:\My Document\NetBeansProjects\KalmeoHelloWorld\build\compiled
E:\My Document\NetBeansProjects\KalmeoHelloWorld\src\org\kalmeo\tutorial\HelloWorld.java:21: cannot find symbol
symbol  : class Screen
location: class org.kalmeo.tutorial.HelloWorld
        Screen screen = new Screen();

Can anyone please help?

 

My code:

 

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.kalmeo.tutorial;

import org.kalmeo.kuix.core.KuixMIDlet;
import org.kalmeo.kuix.widget.Desktop;

/**
 *
 * @author Innovate360
 */
public class HelloWorld extends KuixMIDlet {

    public void initDesktopStyles() {
    }

    public void initDesktopContent(Desktop arg0) {
        // create a displayable Screen object
        Screen screen = new Screen();
        // create a Text widget to show some basic text
        Text text = new Text();
        // set the Text of your object to "Hello World!"
        text.setText("Hello World!");
        // add the text to the screen
        screen.add(text);

        // set the application current screen 
        screen.setCurrent();

    }
}