# Configuration of Perspective Tree

**URL:** <https://forum.inductiveautomation.com/t/configuration-of-perspective-tree/68571>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 13, 2023, 2:35pm UTC](https://forum.inductiveautomation.com/t/configuration-of-perspective-tree/68571 "2023-01-13T14:35:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aybars.Urut](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aybars.urut/32/32003_2.png) [@Aybars.Urut](https://forum.inductiveautomation.com/u/Aybars.Urut)\
**Post date:** [January 13, 2023, 2:35pm UTC](https://forum.inductiveautomation.com/t/configuration-of-perspective-tree/68571/1 "2023-01-13T14:35:37Z")

</div>

hi there,

im wondering about the perspective tree component's multiple selection property. i want to disable that.

and second point is, i want to change fontSize of items.

when i checked the manual, i couldnt found these properties. probably i missed something.

is there anybody has an idea?

thanks in advence.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [January 13, 2023, 2:44pm UTC](https://forum.inductiveautomation.com/t/configuration-of-perspective-tree/68571/2 "2023-01-13T14:44:10Z")

</div>

Add `fontSize` and adjust the `margin` under `props.appearance.unselectedStyle` using the modify style button. It will look something like below. You may need to add it to `selectedStyle` also

```auto
▼ unselectedStyle {3}
    classes :
    fontSize : 22
    margin : 3

```

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [January 13, 2023, 5:07pm UTC](https://forum.inductiveautomation.com/t/configuration-of-perspective-tree/68571/3 "2023-01-13T17:07:03Z")

</div>

There is no configuration property to limit the number of items a user may select, but there are workarounds to implement your own limit.

The important question to ask before you get started is this: when a user attempts to select more than one item, do you want to use the item which was already selected, or do you want to use the most recently clicked item?

Both of these scripts belong in a change script on `props.selection` (right-click `props.selection`, then select "Add Change Script").

Using the old selection:

```auto
	if currentValue and len(currentValue.value) > 1:
		self.props.selection = previousValue

```

Use the most recently selected item:

```auto
	if currentValue and len(currentValue.value) > 1:
		self.props.selection = [currentValue.value[-1]]

```

Please note that these execute AFTER the user attempts the multi-selection, so there will be a flicker on the component when the user tries to select multiple items, but the code will then execute and modify the selection depending on your choice. As the user has indeed selected more than one item, any binding against `props.selection` or script which references that prop will need to account for the scenario where there is more than one selection. This should be pretty easy, because any reference would likely be to an indexed address of `props.selection` anyway, a la `self.props.text = self.getSibling("Tree").props.selection[0]`.

---

<div class="post-metadata">

**Author:** ![Aybars.Urut](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aybars.urut/32/32003_2.png) [@Aybars.Urut](https://forum.inductiveautomation.com/u/Aybars.Urut)\
**Post date:** [January 17, 2023, 1:15pm UTC](https://forum.inductiveautomation.com/t/configuration-of-perspective-tree/68571/4 "2023-01-17T13:15:48Z")

</div>

> [@cmallonee](#):
>
> ```auto
> if currentValue and len(currentValue.value) > 1:
> self.props.selection = [currentValue.value[-1]]
> 
> ```

thank you so much for your detailed explanation. it worked.
