# Programmatically set StackNavigationOptions

**URL:** https://community.thunkable.com/t/programmatically-set-stacknavigationoptions/57609
**Category:** Questions about Thunkable X
**Created:** [November 22, 2018, 1:23pm UTC](https://community.thunkable.com/t/programmatically-set-stacknavigationoptions/57609 "2018-11-22T13:23:41Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![rcd3](https://avatars.discourse-cdn.com/v4/letter/r/9d8465/32.png) [@rcd3](https://community.thunkable.com/u/rcd3)
#### Post date: [November 22, 2018, 1:23pm UTC](https://community.thunkable.com/t/programmatically-set-stacknavigationoptions/57609/1 "2018-11-22T13:23:42Z")

</div>

Hi,

I’m trying to programmatically set StackNavigationOptions (e.g. title, headerTitle, headerTruncatedBackTitle, headerTintColor, gesturesEnabled) using the “set StackNavigationOptions to” block, but it doesn’t work (no error). Any advice would be greatly appreciated. I’ve created a simple demo app to showcase the problem: [https://x.thunkable.com/copy/bb1beb8bbeaa624fa1e8e0395e370b20](https://x.thunkable.com/copy/bb1beb8bbeaa624fa1e8e0395e370b20)

Cheers,

Guido

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [November 23, 2018, 7:45am UTC](https://community.thunkable.com/t/programmatically-set-stacknavigationoptions/57609/2 "2018-11-23T07:45:30Z")

</div>

Hi,

blocks of navigators can not work by definition. Open a blank screen. There are blocks of navigators in the screen block, but they are not in the application. How can you change the property of that which is not?

 ![%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/3/63af0588cbc7fb25e12ea08e81a4c5ace2f42c86.png)

Alex

---

<div class="post-metadata">

### Author: ![rcd3](https://avatars.discourse-cdn.com/v4/letter/r/9d8465/32.png) [@rcd3](https://community.thunkable.com/u/rcd3)
#### Post date: [November 24, 2018, 7:26pm UTC](https://community.thunkable.com/t/programmatically-set-stacknavigationoptions/57609/3 "2018-11-24T19:26:01Z")

</div>

Hi Alex,

In the example you provided, Button1.Text is “undefined” because Screen1’s StackNavigationOptions are empty/undefined by default. I’ve created another demo app that showcases the inconsistency when a screen’s title is set manually (using the Design View) vs. programmatically (using the “set StackNavigationOptions to” block). If I am not mistaken, the “set StackNavigationOptions” block is not working as expected. Take a look at [https://x.thunkable.com/copy/6a360eb1290ff60603cd197b31e8fc08](https://x.thunkable.com/copy/6a360eb1290ff60603cd197b31e8fc08)

Cheers,

Guido

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [November 25, 2018, 7:03am UTC](https://community.thunkable.com/t/programmatically-set-stacknavigationoptions/57609/4 "2018-11-25T07:03:16Z")

</div>

Hi,

the parameters StackNavigationOptions cannot (should not) be undefined. After creating the navigator, it has a property - gesturesEnabled = false, as seen on the properties panel. Logically, it should be displayed in the “get StackNavigationOptions” block. But this is not happening. Properties are there, but they are undefined? This reduces the reliability and stability of the development in Thunkable X and can be a source of bugs.

You are right, “get StackNavigationOptions” does return parameters, but I could not set new parameters.

Regards, Alex

---

<div class="post-metadata">

### Author: ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)
#### Post date: [November 26, 2018, 6:21pm UTC](https://community.thunkable.com/t/programmatically-set-stacknavigationoptions/57609/5 "2018-11-26T18:21:39Z")

</div>

@rcd3 Thanks for finding that bug! I’ve added it to our internal bug queue.

-Mark

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 11:52am UTC](https://community.thunkable.com/t/programmatically-set-stacknavigationoptions/57609/6 "2024-11-08T11:52:38Z")

</div>


