[Gambas-user] What has happened to ValueBox

Michael mdavies5 at ...169...
Fri Dec 17 13:32:45 CET 2010


In Gambas 2 I had a number of Value Boxes which I assigned to Group 
"Value". Then I would identify the calling box in code as follows:
Public Sub Value_GotFocus()
     dim txtTemp as valueBox = LAST
     SELECT CASE txtTemp.Name 'Returns name of calling Value Box
<various actions>

In Gambas 3 I got an error because the Value boxes are recognised as 
plain text boxes not as Value boxes. I changed my code (Dim txtTemp as 
Textbox) but when reading the LAST.Name it returns "TextBox". It is 
returning the type not the name I assigned to the textbox.

The group feature was great for preventing repetitive code but this 
functionality appears to have gone. I must write similar code for each 
TextBox_GotFocus event.

Regards
Michael


On 17/12/10 18:58, wally wrote:
> On Thursday 16 December 2010 22:42:14 Benoît Minisini wrote:
>>> On Thursday 16 December 2010 20:15:21 Fabien Bodard wrote:
>>>> I hope this can help you.
>>>>
>>>> This is in few lines how to make a real time graph in gambas
>>> Fabian,
>>>
>>> thank you very much, i'll study this code tomorrow.
>>>
>>> Would be nice if you may confirm the different behavior of
>>> DrawingArea.Resize in GB2 and GB3.
>>>
>>>
>>> wally
>>>
>> Can you make a little project that shows the problem? The same progressing
>> graph, with just arbitrary data for example. It will highly help to fix
> things
>> if things should be fixed.
>>
>> Regards,
>>
>> -- 
>> Benoît Minisini
>>
>>
> ------------------------------------------------------------------------------
>> Lotusphere 2011
>> Register now for Lotusphere 2011 and learn how
>> to connect the dots, take your collaborative environment
>> to the next level, and enter the era of Social Business.
>> http://p.sf.net/sfu/lotusphere-d2d
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
> Benoit,
>
> i sent already, but maybe attachments has been rejected.
>
> The code below creates 1 circle. After resizing in GB3 i got
> 4 circles. Doing same in GB2 just a resize of the area is performed
> and the primarly created circle persists.
>
> Public Sub btn_test_Click()
>
>   'Drawing Area set to 100, 80
>   ' DrawingArea.cache - True
>   '- ->  200, 160
>
>    Draw.Begin(DrawingArea1)
>      Draw.Circle(50, 40, 30)
>    Draw.End
>
>    DrawingArea1.Resize(200, 160)
>
>    myPicture = DrawingArea1.Screenshot()
>    myPicture.Save(ProjPath&/ "circles.png")
>
> End
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user




More information about the User mailing list