ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TImageEnMView Checkbox Visibility

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
w2m Posted - Jun 20 2014 : 06:02:59
Is it possible... or if not, can an option be added to TImageEnMView which would make checkboxes visible if a thumbnail is selected and not visible on unselected thumbnails?

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
6   L A T E S T    R E P L I E S    (Newest First)
w2m Posted - Jun 23 2014 : 15:47:51
Nigel,

bChecked := False works as expected. Thanks for your efforts. My client will be very happy!


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
xequte Posted - Jun 23 2014 : 14:47:39
Hi Bill

The CheckboxClick event has a bChecked var parameter. You just need to change that to false.


  if AdvTaskDialog1.Execute = mrYes then
  begin
    if bChecked then
    begin
      { Remove the item from the collection }
      Collection1.DeleteImage(idx);
      Collection1.Update;
    end;
  end
  else 
  begin
    { uncheck the checkbox if the image is not deleted }
    bChecked := False;
  end;


Actually I did not envisage deletion of the checked item during this event, but examining the code, calling it in this manner should not present any issues.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
w2m Posted - Jun 23 2014 : 07:41:33
Thank-you for adding the new feature. The new checkbox visibility feature works well... but how do you uncheck a checkbox?
I tried:
procedure TForm1.Collection1CheckboxClick(Sender: TObject; idx: Integer;
  var bChecked: Boolean);
{ Collection1CheckboxClick. }
begin
  { Delete the checked image? }
  AdvTaskDialog1.Clear;
  AdvTaskDialog1.Title := 'Warning';
  AdvTaskDialog1.Instruction := 'Delete This Image';
  AdvTaskDialog1.Content := 'Delete this image from the collection?';
  AdvTaskDialog1.DialogPosition := dpOwnerFormCenter;
  AdvTaskDialog1.Icon := tiQuestion;
  AdvTaskDialog1.CommonButtons := [cbYes, cbNo];
  if AdvTaskDialog1.Execute = mrYes then
  begin
    if bChecked then
    begin
      { Remove the item from the collection }
      Collection1.DeleteImage(idx);
      Collection1.Update;
    end;
  end
  else 
  begin
    { uncheck the checkbox if the image is not deleted }
    Collection1.Checked[idx] := False;
    Collection1.UpdateImage(idx);
    Collection1.Update;
  end;
end;

but the checkbox remains checked if the user selects no?

When the user does not delete the thumbnail the checkbox remains checked despite unchecking the checkbox and refreshing the thumbnail,

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
xequte Posted - Jun 22 2014 : 20:23:12
Hi Bill

Please download the latest source and use:

ImageEnMView1.Checkboxes := iecbShowOnHover;

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
w2m Posted - Jun 22 2014 : 04:43:18
We are using the checkbox to remove a thumbnail, so moving the mouse over the thumbnail exposes the checkbox. User then selects the checkbox to remove the thumbnail. All other thumbnails do not show the checkbox unless the thumbnail is selected or the mouse is over the thumbnail. This is from the specs from my client who wants this feature.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
xequte Posted - Jun 21 2014 : 21:32:54
Hi Bill

Can you please tell us more about your rationale behind this feature?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com