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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 about MultiSelecting
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

kk9750

1 Posts

Posted - Jul 24 2012 :  04:59:32  Show Profile  Reply
Hello,Great ImageEn!
Please help me.

I am read the documents.

TImageEnMView.MultiSelecting

property MultiSelecting:boolean;

Set MultiSelecting to True to simulate a CTRL key press. It allows user to select multiple images with mouse or arrow keys without press CTRL key.

--------------------------------
I am using ImageEn V3.12,but its MultiSelecting property is not work well.

I reference the documnet,wrote following code,
set:
EnableMultiSelect:=true;

then,on the TImagenEnMView component's OnImageSelect event,wrote following code
ImageEnMView1.MultiSelecting:=true;
but,it can't work.




w2m

USA
1990 Posts

Posted - Jul 24 2012 :  08:47:37  Show Profile  Reply

All you have to do to enable multi selctions is to call ImageEnMView1.EnableMultiSelect := True; in OnFormCreate.

procedure TFormMain.FormCreate(Sender: TObject);
begin
  ImageEnMView1.EnableMultiSelect := True;
end;


After you add images to ImageEnMView1 you should be able to select more than one image at a time using the CTRL and SHIFT keys and left mouse button click.

Then after selecting images;
procedure TForm1.Button1Click(Sender: TObject);
var
  i: integer;
  iSelectedIndex: integer;
  iSelectedString: string;
begin
  iSelectedString := 'Process the images you have selected' + #10#13 + #10#13 + 'Selected Indexes: '+ #10#13;
  for i := 0 to ImageEnMView1.MultiSelectedImagesCount - 1 do
  begin
    iSelectedIndex := ImageEnMView1.MultiSelectedImages[i];
    iSelectedString := iSelectedString + IntToStr(iSelectedIndex) + #10#13;
  end;
  // Now process the images you have selected
  // In this case we are just displaying a message that shows the indexes of selected images.
  ShowMessage(iSelectedString);
end;



William Miller
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: