[Gambas-user] A couple of questions
Rob
sourceforge-raindog2 at ...94...
Tue Jun 3 21:40:25 CEST 2003
On Tuesday 03 June 2003 17:35, Ken Schrock wrote:
> Can I "send" an event? (like Win PostMessage)
> i.e. Can I call Button1_Click() if I have no sub (code) for it?
> (more useful real things would be select something in a listbox
> or perhaps drop down the list in a combo box programmatically)
> If so how? (It is often helpful to do this asynchronous)
Well, as I understand it, you can pretty much do anything with events that you
can do in VB (with the addition of being able to name your event subs
anything you like if you want.) The example you give, PostMessage, was an
API call and not really part of VB, though I can see how such a thing would
be useful. Maybe it's possible already (like the Qt emit macro) and I just
don't know about it.
I always had to SendKeys "{F4}" to drop down listboxes in my VB days and I
actually don't know what the equivalent is in Gambas, but other things (like
simulating a mouse click by calling the event sub directly) work much the
same.
> How does the grid control work?
> The component explorer shows how to extract a cell
> But no way I can see to set a cell contents
> (I can't even make it show the grid)
I haven't used the grid control yet, but I'll try to make an example project
this afternoon for you. It seems to me you could also load up the Gambas
Database Manager project and see how it's used there. I suspect it's
something like needing to dim a variable as a cell object, extract the cell
to that object and using the cell's value (or something) property to get the
contents of the cell.
> I see people ask for MDI things
> Why wouldn't the tabstrip work for this type of thing?
> Spreadsheets and browsers both use this paradigm now
> It seems neater and more organized than MDI
The MDI discussion came up because some people wanted the VB5/VB6 MDI look for
Gambas, and once the capability became available I demonstrated how such an
IDE could be made easily. I think a tabstrip is a different paradigm and not
one that's well suited for an IDE (after all, you'd often want a form and its
code onscreen at the same time.) An MDI form with tabbed subforms in it, on
the other hand, could work well.
Rob
More information about the User
mailing list