MSFlexgrid in Xojo

I am switching from VB6 to Xojo, I want to know what is the equivalent control of MSFLEXGRID to be used under Xojo.

Not a direct replacement but the listbox. From what I remember of VB6 the MSFlexGrid control could be linked directly to a datasource and it would populate with a recordset…

I really like Xojo, but there is room for improvement regarding data sources. In Delphi, just drop a Datasource and a Connector on a form and presto! Instant data access even in the IDE. I miss that dearly.

Xojo used to have something like that… but the general consensus was that it was better (and easy( to do it yourself in code and it was removed.

I am using MSflexgrid only to display results, but i am not sure that Xojo listbox has same properties about fixed rows, fixed column, etc…

I agree it is better to do it yourself. VB had all sorts of data aware controls but I always found it easier to do myself. So much more flexibility

What do you mean by fixed rows/columns?

The Flexgrid that came with VB6 was memory leak prone too, and wasn’t well coded overall, from what I had heard from VB experts, so I would always roll my own solution.

I mean same appearance as MSFlexgrid, could you tell me where i can found
an example how to display output values in the Xojo listbox ?

Just get your data into a recordset object then loop through it and load it into a listbox. What exactly do you want to achieve?

That was just the cheap version that was packaged with VB. The VSFlexGrid, which was like a pro version and sold separately by ComponentOne, was a top-notch grid, not much it couldn’t do, and was blazing fast. We used it in all of our products. For Windows, the ListBox can be coaxed into doing a good bit of what the VSFlexGrid can do, except for locking drawing while you do updates, so you kind of have to make sure you are not overly ambitious or you’ll see it. On Carbon it is acceptable, but Cocoa, it really struggles if you are not on a fast machine. Much of the custom stuff you can do is in the Cell Paint events, but unfortunately they fire way too often under Cocoa. Much of what I have been investigating the past week is trying to use flags and booleans to keep the code from going too far down the Cell Paint events when it is not necessary (i.e. when you only need one cell updated).

While the MSFlexGrid did have many problems, it did have the big benefit that it was included with the product. There were an good number of after market products that a programmer could drop into a project and have an nearly instant spreadsheet. I too am moving from VB to XOJO and while the conversion was smooth the app runs very slow under OS X and over twice as fast on Windows running on the same machine. VB made it very easy to write a fast good looking app while XOJO makes you work much harder. The results run on multiple platform from a single code base but optimization is a challenge.

I still think XOJO has the potential to be the biggest programming language around with the right promotion and a few great apps created using XOJO.

Are you building for Carbon or Cocoa? Under Carbon, I’ve got our main app running probably 80% as fast as the Windows version, that is acceptable (and doesn’t have the Windows flicker problems that I have constantly code around and come up tricks to minimize). But on the Cocoa build, I am really struggling to get the UI anywhere close to the Windows or Carbon is. Looks stunning on the rMBP…until you try to use it, just way too sluggish. I’ll talk to support again next week, but right now it is a long way away from being acceptable.

Mike Charlesworth
Not a direct replacement but the listbox. From what I remember of VB6 the MSFlexGrid control could be linked directly to a datasource and it would populate with a recordset…[/quote]

It’s Ok, i have load OLE Container and call MSFlexgrid control as subClass, but running only for windows platforme !