KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Remove from ImageList

 
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion
View previous topic :: View next topic  
Author Message
Gargoyle
KiXforms Aficionado
KiXforms Aficionado


Joined: 30 Dec 2003
Posts: 366
Location: Arizona

PostPosted: Mon Dec 05, 2005 6:41 pm    Post subject: Remove from ImageList Reply with quote

I am using the following
Code:

If $Name[$i,6] <> " "
 $nul = $ImageList.Images.RemoveAt($Name[$i,6])
EndIf


What I did not expect was a re indexing of the images.

I.E If I remove Index 0, what was Index 1 is now Index 0.

So my question would now be, is there a method to remove an image that does not re index. In the meantime I geuss I will look for a way to disable selection of a specified index.

_________________
Parents were invented to make children happy by giving them something to ignore.
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Mon Dec 05, 2005 6:47 pm    Post subject: Reply with quote

I've never tried removing a single image from an ImageList, have only cleared the entire collection. But I would imagine that re-indexing would have to occur.
Back to top
View user's profile Send private message
Gargoyle
KiXforms Aficionado
KiXforms Aficionado


Joined: 30 Dec 2003
Posts: 366
Location: Arizona

PostPosted: Mon Dec 05, 2005 6:51 pm    Post subject: Reply with quote

It makes complete sense, just did not think of it before implementation.

Could I possibly do something like this...

(haven't even tested this)

$Hide = $ImageList.Images($system.hide)
$Hide.Index($Name[$i,6])

_________________
Parents were invented to make children happy by giving them something to ignore.
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Mon Dec 05, 2005 7:04 pm    Post subject: Reply with quote

Dont think so - ultimately though - is the image tied to a ListViewItem that is being displayed in a ListView ?
Back to top
View user's profile Send private message
Gargoyle
KiXforms Aficionado
KiXforms Aficionado


Joined: 30 Dec 2003
Posts: 366
Location: Arizona

PostPosted: Mon Dec 05, 2005 7:09 pm    Post subject: Reply with quote

Yes this is in a listview. I geuss I will take that approach next.
_________________
Parents were invented to make children happy by giving them something to ignore.
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Mon Dec 05, 2005 9:43 pm    Post subject: Reply with quote

How you make out ?
Back to top
View user's profile Send private message
Gargoyle
KiXforms Aficionado
KiXforms Aficionado


Joined: 30 Dec 2003
Posts: 366
Location: Arizona

PostPosted: Mon Dec 05, 2005 9:54 pm    Post subject: Reply with quote

I am wimping out. Found a different way to present the options to the user (radio buttons, button style).

I was trying to go with this...
Code:

For $i = 1 to Ubound($Name)

If $Name[$i,6] <> " "
 $ = $Name[$i,6]
 $nul = $ListView1.Items($).Remove
EndIf
Next

But to no avail.

With radio buttons it is easy to disable a particular one and not have to worry about it. Now it is just a matter of creating the new form.

I have not given up totally, as I would still like to figure it out, but for now taking the easy way out.

_________________
Parents were invented to make children happy by giving them something to ignore.
Back to top
View user's profile Send private message
Gargoyle
KiXforms Aficionado
KiXforms Aficionado


Joined: 30 Dec 2003
Posts: 366
Location: Arizona

PostPosted: Tue Dec 06, 2005 1:10 am    Post subject: Reply with quote

Attached is my fix.

There are references to variables in the script that calls this form, but you will get the idea.



iconchoice2.kix
 Description:

Download
 Filename:  iconchoice2.kix
 Filesize:  61.37 KB
 Downloaded:  788 Time(s)


_________________
Parents were invented to make children happy by giving them something to ignore.
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Tue Dec 06, 2005 1:42 am    Post subject: Reply with quote

lol, ok that form looks very cool.
Back to top
View user's profile Send private message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Tue Dec 06, 2005 2:35 am    Post subject: Reply with quote

yup.
would hope that the "choice" wasn't unknown command Wink

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Gargoyle
KiXforms Aficionado
KiXforms Aficionado


Joined: 30 Dec 2003
Posts: 366
Location: Arizona

PostPosted: Tue Dec 06, 2005 2:37 am    Post subject: Reply with quote

Quote:
form looks very cool


High praise indeed. Thanks, I think it actually works better than my first choice of the imagelist. But I learned alot.

_________________
Parents were invented to make children happy by giving them something to ignore.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group