[Gambas-user] set of questions

Jussi Lahtinen jussi.lahtinen at ...626...
Wed Oct 21 15:47:54 CEST 2009


> 1) May I create proprietary (not open-scource) gambas2-applications and
> components for gambas2?

 Yes, but Qt3 is not free for proprietary use.


> 3) When I hide persistent Form, how to display it again?

 FromName.Show works with me..?


> 5) Can I easily convert my big project from the gambas2-project to the
> gambas3-project?

 With my project it was easy.
 Tools menu --> Update forms.
 Then possibly some minor changes to code.
 Example Write and Read, see documentation for details.


> 6) My project uses gb.qt3, gb.qt3.ext, gb.kde, gb.kde.html components.
> Can I easily switch them to gb.qt4 and other components, when my favour
> Linux-distr Debian will be updated?

 I think gb.qt4 is not completely ready yet. But in future you can, if
I have understand correctly.
 Qt3 <--> GTK+ works well.


Jussi



On Wed, Oct 21, 2009 at 15:15, Doriano Blengino
<doriano.blengino at ...1909...> wrote:
> Faysal Banna ha scritto:
>> no no sir
>> i was asking about the Grid View u were explaining to Dima ...
>> besides i care to know a bit more about in place editing of cells inside the
>> Grid View
>> just click on the cell change the value..
>>
> Uhm...
>
> I never used a Gridview in that way, I simply worked out with my words
> something that already is in the docs (in a very unixish fashion). I
> tried to explain better what the idea behind Data event is.
>
> But after that I have seen, in this thread, a complete example: I cut
> and paste:
>
>> Hopefully this answers question 2. It is a distillation of the database
>> example that comes with Gambas:
>>
>> You just need a gridview, a button called btnRun and a preferably large
>> database with lots of columns so that you can scroll around with ease
>>
>> '========================================================
>> ' Gambas class file
>> PUBLIC $hConnLocl AS NEW Connection
>> PUBLIC $resData AS Result
>> '--------------------------------------------------------
>> PUBLIC SUB Form_Open()
>>   DIM sql AS String
>>
>>   'open the database
>>   WITH $hConnLocl
>>     .type = "mysql"
>>     .host = "localhost"
>>     .Name = "stock"
>>     .login = "charles"
>>     .password="dog"
>>   END WITH
>>   $hConnLocl.Open()
>>
>>   'create a result
>>   sql = "SELECT * FROM grnLine"
>>   $resData = $hConnLocl.Exec(sql)
>>   END
>> '---------------------------------------------------------
>> PUBLIC SUB btnRun_Click()
>>   DIM hForm AS FRequest
>>   DIM hField AS ResultField
>>   DIM iInd AS Integer
>>
>>   GridView1.Rows.count = 0
>>   'set the required number of columns
>>   GridView1.Columns.count = $resData.Fields.Count
>>
>>   'define the column headers and width
>>   FOR EACH hField IN $resData.Fields
>>     WITH hField
>>       GridView1.Columns[iInd].text = .Name
>>       GridView1.Columns[iInd].width = 60
>>     END WITH
>>     INC iInd
>>   NEXT
>>
>>   'create the empty rows. Each empty and visible cell created calls
>> GridView1_data
>>   GridView1.Rows.Count = $resData.Count
>> END
>> '---------------------------------------------------------
>> PUBLIC SUB GridView1_Data(Row AS Integer, Column AS Integer)
>>   'move to the required result row
>>   $resData.MoveTo(row)
>>   'set the data for the cell in the GridView from the column in the selected
>> row of the result
>>   GridView1.Data.text = Str($resData[GridView1.Columns[column].text])
>>   'lets you see how _data is being called as you scroll around the GridView
>>   PRINT row & ":" & column & ":" &
>> Str($resData[GridView1.Columns[column].text])
>> END
>> '----------------------------------------------------------
>>
> Hope this is what you need.
>
> Thanks for your nice appellation, "sir" :-), and regards.
> Doriano Blengino
>
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> 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