[Gambas-user] GAMBAS rules! (And a couple of questions about listboxes and control "arrays")
Bill Richman
bill at ...2350...
Thu Dec 31 17:21:29 CET 2009
First off, I'd like to say that I really, _really_ like GAMBAS. I was
pulling my hair out trying to do something with Open Office macros when
I discovered GAMBAS. I went from taking stabs in the dark at methods
and properties to an auto-prompting system with a really great IDE.
Many thanks to those who developed it and shared it with the rest of us!
Now, the questions... :-)
#1) I've got a form with 144 code-generated tool buttons on it, with
pictures assigned to them. The code that generates them inserts an
"index" number in each button's "tag" property, and I use that to know
which button generated an event. Now, however, I need to be able to
dynamically change the picture assigned to individual buttons. How do I
address a specific button in the group? I suppose I can iterate through
all the tool button class objects on the form and test each one to see
if its tag matches the one that came from LAST.tag, but this seems very
inefficient. Is there a better way? I've been searching the mailing
list archive, but most of the questions about control arrays seem to
deal more with getting all the controls to trigger the same event and
the like.
#2) I've got a list of names, each of which has a number associated with
it. I want the user to be able to select a name from a ListBox control
and get the associated number. These are in an SQLite database, so I'd
thought about looking up the name and returning the number, but since
the names are entered by the user on another form and can be anything,
there's a chance they could enter the same name in more than one record
and confuse things. I'd like to have a "hidden" column in the ListBox
(or another ListBox that's hidden?) that contains the numbers, and that
scrolls and selects "in sync" with the displayed list of names. I
suppose I could insert the numbers in front of the names in the listbox,
and then parse them back out when the user makes a selection, but I'd
rather not have them visible. Any ideas?
#3) My ListBoxes roll smoothly up and down from one list item to
another, like movie credits rolling by, and it's really slow. If I were
the user, this would make me crazy. Is there a way to get them to "jump
scroll" instead of "smooth scroll"? :-$
Any suggestions would be most welcome.
--
Bill Richman - Lincoln, Nebraska
Tilter at windmills, maker of pies in the sky, & curmudgeon
email: bill at ...2351... web: www.timeguy.com/bill
More information about the User
mailing list