[Gambas-user] dateadd
Jeff Johnson
jeffjohnson at ...377...
Fri Jun 24 00:36:22 CEST 2005
Let me explain. As ham radio station beacon on APRS I receive a text line
contain a position report and sometimes weather info. I store that in a
database, and display a button on a map indicating the position. I use a
button because a picture can be displayed on the button. That portion is
fine. But the buttons (location indicators) need to expire after a certain
length of time if the location has not been updated. The expiration is where
I have a problem. I have to have the program look through all the stations in
the database and find the old buttons and delete them. I store the Buttons
name and current handle in the database.
My problem is I have not figured out how to delete a button via program code.
DO WHILE TRUE
hButton = NEW Button(ME) AS "Station"
hButton.X = rData!DLongitude
hButton.Y = rData!DLatitude
hButton.Raise
hButton.Text = rData!Station
hButton.Width = 75
hButton.Height = 7
hButton.Font.Size = 6
hButton.Picture = Picture[rData!Icon]
hButton.Tag = rData!Statusline
mCount = mCount + 1
IF rdata!station = "THORN" THEN
textbox1.Text = hbutton.name
i = hbutton.name
hbutton(i).delete
END IF
IF mCOunt = rData.Count THEN
BREAK
ENDIF
rdata.MoveNext
LOOP
On Wednesday 22 June 2005 22:52, Rob wrote:
> On Wednesday 22 June 2005 19:15, Jeff Johnson wrote:
> > But what is the syntax: button(handle).delete ? I am using buttons
> > on a map (with sometimes over 100 on a map.. I know the
> > hButton.handle and the hbutton.name. But how do I go about removing
> > just one button, None of the syntax makes any sense at all..
>
> If you have an Object[] called "button" (assuming that's allowed... I
> don't think it is) then you'd go button[handle].delete. But it
> sounds like maybe you should post some code, because I don't think I
> really understand what you're trying to do.
>
> Rob
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> 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