arctic: text input

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

arctic: text input

cornel-2
Hi

I am starting to learn haxe and I need a gui library for it; I found
arctic, but I cant really get my head around it, for now. It is
posible to build a multiline text input field with scrollbars?
If yes, can anybody show a minimal example of creating such thing?

thanks
Cornel

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: arctic: text input

gershon
its not really finished, hence, not as much for the beginner haxer, but here's how it would look like in haxegui:

import flash.text.TextField;
import haxegui.container.Container;
import haxegui.controls.ScroolBar;
using haxegui.utils.Color;

var container = new Container();
container.init({width: 300, height: 200, color: Color.BLACK.tint(.5)});

var tf = container.addChild(new TextField());
tf.multiline = true;

var sb = new ScrollBar(container);
sb.init({ target: tf});


//var onResize = function(e) { tf.witdh=container.width; tf.height=container.height; sb.x=container.width-sb.width; };
//container.addEventListener(ResizeEvent.RESIZE, onResize, false, 0, true);

this should put a container on stage, with 2 children, and link the scrollbar(vertical)  to the scroll property of the textfield.
layout, positioning and resizing are up to you, they'd probably both be created at the container's topleft...


On Wed, Aug 5, 2009 at 12:23 PM, cornel <[hidden email]> wrote:
Hi

I am starting to learn haxe and I need a gui library for it; I found
arctic, but I cant really get my head around it, for now. It is
posible to build a multiline text input field with scrollbars?
If yes, can anybody show a minimal example of creating such thing?

thanks
Cornel

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: arctic: text input

David Bergman
In reply to this post by cornel-2
I sent a patch to this list for Arctic so it could detect key events,  
and thereby get the text input model to work. Am not sure whether this  
patch - or equivalent fix - is part of a later build of Arctic, but if  
that is your problem, let me know, and I will reissue the patch.

/David

On Aug 5, 2009, at 5:23 AM, cornel wrote:

> Hi
>
> I am starting to learn haxe and I need a gui library for it; I found
> arctic, but I cant really get my head around it, for now. It is
> posible to build a multiline text input field with scrollbars?
> If yes, can anybody show a minimal example of creating such thing?
>
> thanks
> Cornel
>
> --
> haXe - an open source web programming language
> http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: arctic: text input

cornel-2
It was not the library missing something, but me dont understanding
how arctic works. However, I managed to put something togheter:

                var gui =ConstrainHeight( 300, 100,
                        LineStack([
                                TextInput(" ", 300, null),
                        ])
                );
                       
                var arcticView = new ArcticView(gui, parent);
                arcticView.display(true);

Thanks all for the answers.

2009/8/5 David Bergman <[hidden email]>:

> I sent a patch to this list for Arctic so it could detect key events, and
> thereby get the text input model to work. Am not sure whether this patch -
> or equivalent fix - is part of a later build of Arctic, but if that is your
> problem, let me know, and I will reissue the patch.
>
> /David
>
> On Aug 5, 2009, at 5:23 AM, cornel wrote:
>
>> Hi
>>
>> I am starting to learn haxe and I need a gui library for it; I found
>> arctic, but I cant really get my head around it, for now. It is
>> posible to build a multiline text input field with scrollbars?
>> If yes, can anybody show a minimal example of creating such thing?
>>
>> thanks
>> Cornel
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

--
haXe - an open source web programming language
http://haxe.org