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
 Select question
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

pierrotsc

USA
497 Posts

Posted - Jan 24 2019 :  15:12:37  Show Profile  Reply
I am trying to select all layers except the background. my ielayermview shows all of them selected. I tried everything. here's my code. if someone has an idea on how to show them all selected but not layer 0, let me know.

var
I: Integer;
begin
for I := 1 to imageenview.LayersCount - 1 do
imageenview.Layers[I].Selected := True;
imageenview.Layers[0].Selected := False;
IELayerMView1.Update;

xequte

38611 Posts

Posted - Jan 24 2019 :  22:39:23  Show Profile  Reply
Hi

Both of these work in my testing:

imageenview1.LayersSelectAll();
IELayerMView1.Update;

for I := 1 to imageenview1.LayersCount - 1 do
imageenview1.Layers[I].Selected := True;
Imageenview1.Layers[0].Selected := False;
IELayerMView1.Update;



Are you sure loAllowMultiSelect is enabled in LayerOptions:

https://www.imageen.com/help/TImageEnView.LayerOptions.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

pierrotsc

USA
497 Posts

Posted - Jan 25 2019 :  09:03:11  Show Profile  Reply
Does not work for me. i have multiselect enabled. look at the screenshot. you can see that the background layer is still highlighted so i assume selected.

Go to Top of Page

w2m

USA
1990 Posts

Posted - Jan 25 2019 :  10:31:26  Show Profile  Reply
Nigel's code works here as expected. After all layers are selected except for the background layer. Both TImageEnView and TImageEnLayerMView show that all layers except for the background layer are selected in both components. Layer 0 is not selected in both components.


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

pierrotsc

USA
497 Posts

Posted - Jan 25 2019 :  10:37:52  Show Profile  Reply
Well, does not for me. same code i copied/paste in my program. As you can see the background is clearly selected.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Jan 25 2019 :  10:45:42  Show Profile  Reply
What do you have TImageEnLayerMView.LayerOrder set as? I am using TImageEnLayerMView.LayerOrder := ieloBackgroundFirst.

Based on your screen capture it is hard for me to determine if the TImageEnLayerMView Background layer is selected. Your screen capture shows that the background layer in TImageEnView is not selected.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

pierrotsc

USA
497 Posts

Posted - Jan 25 2019 :  11:13:43  Show Profile  Reply
The background layer is named Ilford.... first one in the bottom of the stack in ielayermview. it is clearly blue and selected. if i look at your screenshot, your background layer is white.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Jan 25 2019 :  11:20:37  Show Profile  Reply
My screenshot shows the expected results. The background layer is not selected in either component. As I understand it you want all layers selected except layer 0 in both components.

Try my suggestion to see if it works for you.

It is possible that if the background layer is shown at the bottom TImageEnLayerMView may be the problem. I am not sure however.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

pierrotsc

USA
497 Posts

Posted - Jan 25 2019 :  11:24:11  Show Profile  Reply
If i deselect all, the everything looks good. It is when i loop, they get all selected. what was your suggestion ?
How do you make the background layer at the top instead of the bottom ?
Go to Top of Page

w2m

USA
1990 Posts

Posted - Jan 25 2019 :  11:26:10  Show Profile  Reply
I just tried setting ImageEnLayerMView1.LayerOrder to ieloTopFirst. When I select all layers, all layers are selected in both components except for layer 0. so my idea is not correct. Perhaps you have some other option set incorrectly because here is works.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

pierrotsc

USA
497 Posts

Posted - Jan 25 2019 :  11:32:43  Show Profile  Reply
ok, let me look at my code then. if it works for you and Nigel, it has to be me..Thanks
Go to Top of Page

pierrotsc

USA
497 Posts

Posted - Jan 25 2019 :  11:45:05  Show Profile  Reply
Ok, i am able to reproduce it. Load the layersediting demo. Create a button with Nigel's code. load an image. then add another image layer. select the background layer in ielayermview. then click the button. both layers will now be selected in ielayermview. see attached.



Go to Top of Page

xequte

38611 Posts

Posted - Jan 25 2019 :  19:44:00  Show Profile  Reply
OK, there is a bug there based on current layer vs. layer selection. We'll have a fix in v8.3.0.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: