Re: Moving array elements
Jon Ogden <[email protected]> Sat, 17 Nov 2018 11:45:36 -0600
| Newsgroups | gmane.comp.lang.realbasic.user |
|---|---|
| Message-ID | <[email protected]> |
Not really. You can do it manually pretty easily. There=E2=80=99s a number of functions: Sort Shuffle Pop Remove Insert Easiest way is to take the element you want remove it from the array and = then insert it back into the position where you want it. It=E2=80=99s = quite simple to do. You might want to consider putting items into a dictionary instead. = Then you don=E2=80=99t need to worry about the order. You have a = keyword instead for each item in the dictionary and then you grab the = item you want based on the keyword. Jon > On Nov 17, 2018, at 11:41 AM, ER <[email protected]> wrote: >=20 > Hi, >=20 > Does XOJO have anything built in to move array elements around ? I = have a project where when a picture is added to the canvas its also = stored in an array (object array). So when drawn it does so as they were = entered into the array.=20 > I =E2=80=98m looking to add a =E2=80=9Cmove forward/backward=E2=80=9D = option so I can moves an object(=E2=80=99s) in front of behind others. >=20 > Thanks.