Re: [Gambas-user] TextArea scrolling

2009-05-26 Thread Jussi Lahtinen
Thanks!
This solution works in my case:
TextArea1.Text = Something  gb.NewLine
TextArea1.Pos = TextArea1.Length
TextArea1.EnsureVisible()


Jussi



2009/5/25 Benoît Minisini gam...@users.sourceforge.net:
  When adding line to textarea:
  TextArea1.Text = Something  gb.NewLine
  Cursor jumps to columnline zero.
 
  Normal, you are assigning the Text property. Use the Insert() method
  instead.

  Ok... I did it vb6 way...
  But there is still problem. Mouse click on the textarea mess up the
 cursor position,
  and next insert ruins output. Even if ReadOnly property is True.

  And also I use Mid$() to edit content of the textarea.
  Like this;
  Mid$(.Text, (Len(.Text) - iLastMessageLen), Len(.Text)) = (sTellMe 
 gb.NewLine)
  It is meant to correct the output afterwards if needed.
  But maybe there is other way to erase last message and replace it
 with new one... this is
  quickly converted from vb6 code.

  Is there way to determine cursors last column and last line?
  At this point I'm not sure how to do this...


 Jussi


 Use The Pos property to set the position of the cursor. To solve your problem,
 just set the cursor to the end of the text before calling Insert:

 MyTextArea.Pos = MyTextArea.Length
 MyTextArea.Insert(text)

 Moreover, you must use UTF-8 String methods to deal with the contents of any
 GUI Text property.

 I suggest you read the documentation of the TextArea widget carefully!

 Regards,

 --
 Benoît

 --
 Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
 is a gathering of tech-side developers  brand creativity professionals. Meet
 the minds behind Google Creative Lab, Visual Complexity, Processing, 
 iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
 Group, R/GA,  Big Spaceship. http://www.creativitycat.com
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA,  Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TextArea scrolling

2009-05-26 Thread Benoît Minisini
 Thanks!
 This solution works in my case:
 TextArea1.Text = Something  gb.NewLine
 TextArea1.Pos = TextArea1.Length
 TextArea1.EnsureVisible()


 Jussi


Using TextArea1.Insert() is better and faster.

Regards,

-- 
Benoît

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA,  Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TextArea scrolling

2009-05-25 Thread Jussi Lahtinen
Hi!
I must wake up this forgotten issue...
This is still valid problem and I got more information about it.

This line of code:
TextArea1.EnsureVisible()
In GTK+, makes textarea to scroll down, but in Qt it in fact do
opposite, scroll up!
So if you haven't touch to scroll bar, it looks like it doesn't do anything.

I think EnsureVisible should ensure that last message is visible not first.


Jussi



On Mon, Apr 6, 2009 at 18:02, Jussi Lahtinen jussi.lahti...@gmail.com wrote:
 Absolutely nothing happens in Qt, but with GTK+ it works as expected.
 It works in your system?


 Jussi


 2009/4/6 Benoît Minisini gam...@users.sourceforge.net:
 I was just writing about this issue!
 It turn out to be bug!

 This works on GTK+, but not with Qt;
 TextArea1.EnsureVisible()

 So, if you are using GTK+ you have your solution... If not, you must
 wait for fix.


 Jussi


 Forget my other mail: the EnsureVisible() method is perfectly valid, but I
 don't see why it would not work with Qt.

 --
 Benoît

 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TextArea scrolling

2009-05-25 Thread Jussi Lahtinen
OK, two problems.

When adding line to textarea:
TextArea1.Text = Something  gb.NewLine
Cursor jumps to columnline zero.

Other problem is that I need propertie ReadOnly to be True,
and then at least the cursor is not visible if there even is one.


Jussi



2009/5/25 Benoît Minisini gam...@users.sourceforge.net:
 Hi!
 I must wake up this forgotten issue...
 This is still valid problem and I got more information about it.

 This line of code:
 TextArea1.EnsureVisible()
 In GTK+, makes textarea to scroll down, but in Qt it in fact do
 opposite, scroll up!
 So if you haven't touch to scroll bar, it looks like it doesn't do
 anything.

 I think EnsureVisible should ensure that last message is visible not first.


 Jussi


 According to the Qt/GTK+ documentation, EnsureVisible() should ensure that the
 cursor is visible, not especially the last line. Can you check the position of
 the cursor before calling EnsureVisible() ?

 --
 Benoît

 --
 Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
 is a gathering of tech-side developers  brand creativity professionals. Meet
 the minds behind Google Creative Lab, Visual Complexity, Processing, 
 iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
 Group, R/GA,  Big Spaceship. http://www.creativitycat.com
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TextArea scrolling

2009-05-25 Thread Benoît Minisini
 OK, two problems.

 When adding line to textarea:
 TextArea1.Text = Something  gb.NewLine
 Cursor jumps to columnline zero.

Normal, you are assigning the Text property. Use the Insert() method instead.


 Other problem is that I need propertie ReadOnly to be True,
 and then at least the cursor is not visible if there even is one.

Even if you don't see it, the cursor is there.

Regards,

-- 
Benoît

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TextArea scrolling

2009-04-06 Thread Joshua Higgins
Did you find a solution?

2009/4/4 Jussi Lahtinen jussi.lahti...@gmail.com

 Hi!

 How I can automatically scroll down textarea?
 So that the last message printed to textarea is always showing,
 without user have to scroll down?

 Regards,
 Jussi


 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user




-- 
joshua higgins
--
--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TextArea scrolling

2009-04-06 Thread Jussi Lahtinen
I was just writing about this issue!
It turn out to be bug!

This works on GTK+, but not with Qt;
TextArea1.EnsureVisible()

So, if you are using GTK+ you have your solution... If not, you must
wait for fix.


Jussi



On Mon, Apr 6, 2009 at 17:13, Joshua Higgins joshigg...@googlemail.com wrote:
 Did you find a solution?

 2009/4/4 Jussi Lahtinen jussi.lahti...@gmail.com

 Hi!

 How I can automatically scroll down textarea?
 So that the last message printed to textarea is always showing,
 without user have to scroll down?

 Regards,
 Jussi


 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user




 --
 joshua higgins
--
 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TextArea scrolling

2009-04-06 Thread Benoît Minisini
 I was just writing about this issue!
 It turn out to be bug!

 This works on GTK+, but not with Qt;
 TextArea1.EnsureVisible()

 So, if you are using GTK+ you have your solution... If not, you must
 wait for fix.


 Jussi


It's the contrary: The EnsureVisible() method should not be there. :-)

But just moving the cursor should make it automatically visible both with Qt 
and GTK+.

Regards,

-- 
Benoît

--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TextArea scrolling

2009-04-06 Thread Benoît Minisini
 I was just writing about this issue!
 It turn out to be bug!

 This works on GTK+, but not with Qt;
 TextArea1.EnsureVisible()

 So, if you are using GTK+ you have your solution... If not, you must
 wait for fix.


 Jussi


Forget my other mail: the EnsureVisible() method is perfectly valid, but I 
don't see why it would not work with Qt.

-- 
Benoît

--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TextArea scrolling

2009-04-06 Thread Jussi Lahtinen
Absolutely nothing happens in Qt, but with GTK+ it works as expected.
It works in your system?


Jussi


2009/4/6 Benoît Minisini gam...@users.sourceforge.net:
 I was just writing about this issue!
 It turn out to be bug!

 This works on GTK+, but not with Qt;
 TextArea1.EnsureVisible()

 So, if you are using GTK+ you have your solution... If not, you must
 wait for fix.


 Jussi


 Forget my other mail: the EnsureVisible() method is perfectly valid, but I
 don't see why it would not work with Qt.

 --
 Benoît

 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user