[Gambas-user] Inputbox

Cogier charlie at ...2793...
Thu Aug 9 20:20:20 CEST 2012


Thanks again Matti-4.

I took your advice regarding Gambas3 and I love the new collapsible SUBs and
the way that changing a button name automatically changes the code.

BUT

I have installed it on 2 machines one with Mint 13 and the other with Ubuntu
12.04 and in both cases the program will run but clicking on the "Buttons"
has no effect.

I installed it from the instructions on the Gambas site adding the PPA below
and installing with APT-GET.
http://ppa.launchpad.net/nemh/gambas3/ubuntu

Am I doing something wrong?


Matti-4 wrote:
> 
> Hmm. I don't have gb2 on my machine anymore, so I can't tell why it isn't
> centered.
> Btw: you should update to gb3, it's much better!
> 
> Example code for a ShowModal window:
> 
> Create a form FMain with just two buttons (btnCancel and btnInput).
> Then create a form FInput with the Text "What's your name?", a TextBox 
> (TextBox1) and two buttons (btnCancel and btnOK).
> 
> The FMain code is:
> 
> Public Sub Form_Open()
>    Me.Center
> End
> 
> Public Sub btnCancel_Click()
>    Me.Close
> End
> 
> Public Sub btnInput_Click()
>    FInput.ShowModal
>    If Me.Tag = "" Then
>        Print "User has cancelled."
>      Else
>        Print "The name is " & Me.Tag & "."
>    Endif
> End
> 
> The FInput code is:
> 
> Public Sub btnCancel_Click()
>    FMain.Tag = ""
>    Me.Close
> End
> 
> Public Sub btnOK_Click()
>    FMain.Tag = TextBox1.Text
>    Me.Close
> End
> 
> Easy, isn't it?
> 
> 
> 
> Am 07.08.2012 15:34, schrieb Cogier:
>>
>> Thanks for the reply Matti-4.
>>
>> I am using Gambas 2.23, Ubuntu 12.04, Gnome 3.
>>
>> Can you give me any example code of the 'xyz.ShowModal'?
>>
>> Thanks for any help.
>>
>>
>> Matti-4 wrote:
>>>
>>> What is your Gambas version and your environment?
>>> Here (Gambas 3, OpenSuse 12.1, KDE), the InputBox is correctly centered.
>>>
>>> But as a workaround, you can easily create a tiny form for the input and
>>> open it
>>> with 'xyz.ShowModal'. That is surely centered, and it takes about the
>>> same
>>> amount of code.
>>>
>>>
>>> Am 06.08.2012 10:15, schrieb Cogier:
>>>>
>>>> Is there a way to centre the InputBox on the screen as I always see it
>>>> in
>>>> the
>>>> top left hand corner and it is missed by the user?
>>>>
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 

-- 
View this message in context: http://old.nabble.com/Inputbox-tp34259974p34278479.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list