| View previous topic :: View next topic |
| Author |
Message |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Fri May 13, 2011 12:22 am Post subject: |
|
|
| Can you post a snippet of codet where you use the check box? |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Fri May 13, 2011 12:35 am Post subject: |
|
|
Well, all I did was create an image list and then use this code:
I can't really post more than this, as there is a buyer for the source and the agreement is not to post or make it open source.
%k is if the file was updated. It normally puts the green check icon (the #sn). This is prolly not enough to find the reason for the bug.
| Code: |
if @file(%e%a)
if %k
#list add,Snapshots,@item(%%tmp,%x)|#sn
tItem STATEIMAGE,Snapshots,%x,0
tItem IMAGE,Snapshots,%x,2,0
tItem INDENT,Snapshots,%x,1
else
list add,Snapshots,@item(%%tmp,%x)|@GetIcon(%e%a)
end
else
#list add,Snapshots,@item(%%tmp,%x)|#nf
tItem STATEIMAGE,Snapshots,%x,1
tItem IMAGE,Snapshots,%x,2,1
end
|
_________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Fri May 13, 2011 1:45 am Post subject: |
|
|
I understand
Can you post or PM me where you created the imagelist to include the lines where you added the images to the imagelist?
Considering that I am the author of the extTable DSU you are using we could just consider it DSU support  |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Fri May 13, 2011 2:00 am Post subject: |
|
|
Sure. I'll get to that sometime tomorrow. _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Fri May 13, 2011 3:21 am Post subject: |
|
|
Remember to make sure you assign the imagelist as "small" to the table and then assign it again as "state" if you are using the same imagelist for both. Else you will need to create 2 imagelists and assign them accordingly.
Another possibility is if you are using the normal vds way to put images on your table you will only need to create and assign a state imagelist.
In your snippet it looks like you are trying to use the standard vds method and the extTable method to insert the non-state images. You need to do one or the other. The VDS table element already has its own "small" imagelist by default. If you assign a different "small" imagelist to the table, it will negate the original one. You can, however, insert the non-state images the regular way and still assign a "state" imagelist without affecting the other. This would probably be the best way in your case since you are constantly adding images based on unknown file types.
Summary:
Create an imagelist and assign it to the table as "STATE" then add your check img to it. (Note: The State imagelist index starts at "1" instead of "0". Type would be "2")
| Code: | # ImageList CREATE,< ImgList >,<width>,<height>,<flags>,<initial>,<grow>
IMAGELIST CREATE,StateImages,16,16,color32|mask,0,1
# ImageList ASSIGN,<ImgList>,<table>,<type>
Note: <type> can be 0 (Normal) or 1 (Small) or 2 (State) {Default is Small}
IMAGELIST ASSIGN,StateImages,Snapshots,2
# ImageList ADDMASKED,<ImgList>,<image>,<maskColor>,<width>,<height>
IMAGELIST ADDMASKED,StateImages,Check.bmp,$FFFFFF,16,16 |
Then set the State Check icon where needed (iImage would be "1" in this case)
| Code: | # tItem STATEIMAGE,<Table>,<Index>,<iImage>
tItem STATEIMAGE,Snapshots,%x,1 |
To remove the State image set iImage to -1
| Code: | # tItem STATEIMAGE,<Table>,<Index>,-1
tItem STATEIMAGE,Snapshots,%x,-1 |
Use the regular VDS way to insert the file icon images.
| Code: | | list add,Snapshots,@item(%%tmp,%x)|@GetIcon(%e%a) |
I hope I made sense  |
|
| Back to top |
|
 |
|
|
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 can attach files in this forum You can download files in this forum
|
|