[Gambas-user] Possible bug with ColorPalette
cedron at exede.net
Thu Jul 2 20:25:44 CEST 2020
The two functions appear to be synonyms. They both work the same for me.
I just tested with "Extract" in place, no difference in behavior. There was not a question of the return value being the removed members, that worked. It is that the original list remains unaltered. For Extract, that makes sense, for Delete, it doesn't.
----- Original Message -----
From: "Hans Lehmann" <hans at gambas-buch.de>
To: "user" <user at lists.gambas-basic.org>
Sent: Thursday, July 2, 2020 11:53:46 AM
Subject: Re: [Gambas-user] Possible bug with ColorPalette
Function Delete ( Start As Integer [ , Length As Integer ] ) As Integer
Function Extract ( Start As Integer [ , Length As Integer ] ) As Integer
Removes one or more elements from the array, and returns them.
If Length is -1, then all elements from the specified Start to the end of the array are removed.
Public Sub ButtonDelete1_Click()
Dim iArray As Integer = ColorPalette1.Colors
iArray = ColorPalette1.Colors.Delete(0, 3)
ColorPalette1.Colors = iArray
Works exactly as specified... .
----[ http://gambaswiki.org/wiki/doc/netiquette ]----
More information about the User