[Gambas-user] set of questions

Ron_1st ronstk at ...239...
Thu Oct 22 09:10:20 CEST 2009


On Wednesday 21 October 2009, Faysal Banna wrote:
> what is the way to get modifying a cell inside  a grid view like
> u click on a cell and start writing inside it then when u click away its
> already modified ?
> 
> regards
> 
> On Wed, Oct 21, 2009 at 4:47 PM, Jussi Lahtinen <jussi.lahtinen at ...626...>wrote:
> 
> > > 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
> > >
> > >
> > >

I don't see the connection with gambas from usb stick.
Can you enligth me?


Best regards,

Ron_1st

-- 
 A: Hijacking the thread from other subjects.
 Q: What is the second most annoying thing in e-mail? 
-- 
 A: Delete the text you reply on.
 Q: What to do to get my post on top?
---
 A: Because it messes up the order in which people normally read text. 
 Q: Why is top-posting such a bad thing? 
---
 A: Top-posting. 
 Q: What is the most annoying thing in e-mail? 
 




More information about the User mailing list