[Gambas-user] Custom List Control

2015-07-29 Thread Patrick Wright
Hello,

I am working on a simple, custom control similar to the ListBox using a
ListContainer and TextLabels.  I am using these two items because the
default ListBox control (and every other list) don't seem to support text
wrapping or fonts.

Everything seems to be going well, however I am unable to find a method to
make the ListContainer scroll to a speici item in code.  When i add a new
item, I would like it to be scrolled to so it is visible. Normally, this
would be accomplished with the .Index property in the ListBox, but this
does not have the same affect in a ListContainer.

Any ideas on how I could get this to work?

Gambas Version: 3.5.4

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


[Gambas-user] Custom List Control

2015-07-30 Thread Patrick Wright
I was unaware I was using an outdated version of Gambas. I added the repository 
for the most recent stable release (or so I thought) to Ubuntu. I will look 
into using a GridView of ScrollArea.

Thanks,
Patrick

On Jul 29, 2015, at 2:46 PM, Benoît Minisini  
wrote:

> Le 29/07/2015 21:38, Patrick Wright a écrit :
>> Hello,
>> 
>> I am working on a simple, custom control similar to the ListBox using a
>> ListContainer and TextLabels.  I am using these two items because the
>> default ListBox control (and every other list) don't seem to support text
>> wrapping or fonts.
>> 
>> Everything seems to be going well, however I am unable to find a method to
>> make the ListContainer scroll to a speici item in code.  When i add a new
>> item, I would like it to be scrolled to so it is visible. Normally, this
>> would be accomplished with the .Index property in the ListBox, but this
>> does not have the same affect in a ListContainer.
>> 
>> Any ideas on how I could get this to work?
>> 
>> Gambas Version: 3.5.4
>> 
>> Thanks,
>> Patrick
> 
> ListContainer has been deprecated since, mainly because of such limits. I 
> suggest that you remake your control based a GridView or a ScrollArea.
> 
> Can't you use a more recent version of Gambas anyway?
> 
> Regards,
> 
> -- 
> Benoît Minisini
> 
> 

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


Re: [Gambas-user] Custom List Control

2015-07-30 Thread Patrick Wright
Alright, I have inherited a ScrollArea in my new control and have made sure to 
set is .ScrollBar property to Scroll.Vertical.  However, when I call my Add 
member function which creates a new instance of a TextLabel with Me as the 
parent, it does not cause the scroll bar to appear when the items overflow the 
current view. This is odd because I can replicate the same code in a simple 
form outside of the control and everything works correctly.

Do you know why this would be occurring?

Patrick

On Jul 30, 2015, at 7:54 AM, Patrick Wright  wrote:

> I was unaware I was using an outdated version of Gambas. I added the 
> repository for the most recent stable release (or so I thought) to Ubuntu. I 
> will look into using a GridView of ScrollArea.
> 
> Thanks,
> Patrick
> 
> On Jul 29, 2015, at 2:46 PM, Benoît Minisini  
> wrote:
> 
>> Le 29/07/2015 21:38, Patrick Wright a écrit :
>>> Hello,
>>> 
>>> I am working on a simple, custom control similar to the ListBox using a
>>> ListContainer and TextLabels.  I am using these two items because the
>>> default ListBox control (and every other list) don't seem to support text
>>> wrapping or fonts.
>>> 
>>> Everything seems to be going well, however I am unable to find a method to
>>> make the ListContainer scroll to a speici item in code.  When i add a new
>>> item, I would like it to be scrolled to so it is visible. Normally, this
>>> would be accomplished with the .Index property in the ListBox, but this
>>> does not have the same affect in a ListContainer.
>>> 
>>> Any ideas on how I could get this to work?
>>> 
>>> Gambas Version: 3.5.4
>>> 
>>> Thanks,
>>> Patrick
>> 
>> ListContainer has been deprecated since, mainly because of such limits. I 
>> suggest that you remake your control based a GridView or a ScrollArea.
>> 
>> Can't you use a more recent version of Gambas anyway?
>> 
>> Regards,
>> 
>> -- 
>> Benoît Minisini
>> 
>> 
> 
> 

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


[Gambas-user] UDP Segmentation Fault

2015-07-30 Thread Patrick Wright
I am either doing something incorrectly or there is a bug with UDP sockets in 
Gambas. I have created a new instanceof a UDPSocket, set its Port property, 
and called the Bind method. 

I have an event handler for the Read event on this socket. In this method I am 
simply using Read #MySocket, Val, Lof(MySocket) to get the data that was sent.  
Up to this point everything works as intended, however when I try to send a 
reply using Write, the program crashes and Ubuntu gives a Segmentation Fault. I 
have tried using the Begin and Send methods, but this causes the same error.

Am I going about this the wrong way?

Gambas Version: 3.7.1

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