# Get ProgressBar from Widget Component and Update Progress

**URL:** <https://forums.unrealengine.com/t/get-progressbar-from-widget-component-and-update-progress/421601>\
**Category:** UI\
**Tags:** actor-blueprint, unreal-engine, Widget, Blueprint, question\
**Created:** [April 2, 2018, 1:38pm UTC](https://forums.unrealengine.com/t/get-progressbar-from-widget-component-and-update-progress/421601 "2018-04-02T13:38:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_b421cc23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b421cc23](https://forums.unrealengine.com/u/anonymous_user_b421cc23)\
**Post date:** [April 2, 2018, 1:38pm UTC](https://forums.unrealengine.com/t/get-progressbar-from-widget-component-and-update-progress/421601/1 "2018-04-02T13:38:01Z")

</div>

Hi at all,  
I’ve got a WidgetBlueprint which includes a ProgressBar.  
I called it `ProgressBarWidget`.  
I’ve an Actor, which got the `loadingTimeSeconds` variable.  
This variable includes for the action needed Seconds in `float`. (The Actor needs X,XX Seconds to finish his Task)

_Questions:_

1. How can I get the ProgressBar from `WidgetComponent`, which includes the `ProgressBarWidget` Class, to update the Progress with from the Actors provided variable’s?
2. How can I let the ProgressBar completely filled within given Seconds?  
For example:  
Given Seconds: 2,34  
The ProgressBar should be filled every X millis (Show Progress) and finished after 2,34 Seconds (100% reached).

_Widget Settings:_

![235950-modeltestwidgetclass.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/f/92f27ca395e5ca8f612593f83db336d41c894a10.png)

_Function within Actor:_

![235961-functionloadprogressbar.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/7/9/679fc3eb4cb27577e32dec57076cce49a3ef538b.png)

If I could get a `Reference` of the `ProgressBar`, which is within the `WidgetClass`, from the `Widget` (`TestWidget`).  
Then I might me able to Update the Progress of the `ProgressBar`.  
If I could’t get any reference of it, from the `Widget` (`TestWidget`).  
Then It would be nice to know, how to attach an ProgressBar to the Actor, which looks like the Image under the Section “Actor Viewport” of my Post.

_Actor Viewport:_

![235949-modelview.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/9/b/79b44aedf7020d1853d2dae60a0a4cf69c3e67f8.png)

I’ve made the Widget visible in Viewport, to show how it looks.  
Normally it is invisible and just showing when the Function “`Progress Bar Loading`” is called.

Thanks in advance for any helpful advise.

---

<div class="post-metadata">

**Author:** ![StarfireDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StarfireDev](https://forums.unrealengine.com/u/StarfireDev)\
**Post date:** [April 2, 2018, 2:11pm UTC](https://forums.unrealengine.com/t/get-progressbar-from-widget-component-and-update-progress/421601/2 "2018-04-02T14:11:40Z")

</div>

You will need to store the created widget reference for that.

Either you can add a function inside your ProgressBarWidget called “UpdateProgressBar” with a float input and set the bar progress inside of it  
OR  
You get the stored reference and you will be granted access to all variables from this class. Just make sure to check the “IsVariable” box right next to your ProgressBar widget name.

![235958-ah.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/1/2/f129288b674714b60168d2a4c36d92c0b4b16320.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b421cc23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b421cc23](https://forums.unrealengine.com/u/anonymous_user_b421cc23)\
**Post date:** [April 2, 2018, 2:22pm UTC](https://forums.unrealengine.com/t/get-progressbar-from-widget-component-and-update-progress/421601/3 "2018-04-02T14:22:59Z")

</div>

I think you misunderstood the difference between a `WidgetBlueprint` and a `WidgetComponent`.  
Or did you want to tell me, that I need to create the Widget (`ProgressBarWidget`) without adding it to the Viewport and it will get a “magic” reference to the ProgressBar within the `WidgetComponent`?  
Please explain it to me.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b421cc23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b421cc23](https://forums.unrealengine.com/u/anonymous_user_b421cc23)\
**Post date:** [April 2, 2018, 2:28pm UTC](https://forums.unrealengine.com/t/get-progressbar-from-widget-component-and-update-progress/421601/4 "2018-04-02T14:28:28Z")

</div>

My ProgressBar, within the `ProgressBarWidget`, is called `GenericProgressBar`.  
But I can’t get a access.  
_`WidgetComponent`, which contains `ProgressBarWidget` class:_

![235966-possibilities.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/8/1/c81522eb2c99f44424f2a37733aaa959d2645a3c.png)

_Try to find `GenericProgressBar`:_

![235967-possibilities-two.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/1/921392300f77deb0592570230bc3db59eafda594.png)

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [April 2, 2018, 2:44pm UTC](https://forums.unrealengine.com/t/get-progressbar-from-widget-component-and-update-progress/421601/5 "2018-04-02T14:44:42Z")

</div>

BP\_HUD is your ProgressBarWidget.  
Widget1 is your testWidget.  
Then you will have access to the progress bar.

 ![235968-untitled.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/c/6/ac64ee828f72ebbe206e6298e0aa2dea7365a7aa.png)

---

<div class="post-metadata">

**Author:** ![StarfireDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StarfireDev](https://forums.unrealengine.com/u/StarfireDev)\
**Post date:** [April 2, 2018, 11:29pm UTC](https://forums.unrealengine.com/t/get-progressbar-from-widget-component-and-update-progress/421601/6 "2018-04-02T23:29:59Z")

</div>

Ah, sorry. My fault!

Actually, the solution is what EvilCleric has posted.

Got an example Crosshair Widget I’ve created in a project to show you how to actually access it from WidgetComponent.

![236024-ah2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/2/b/82b3337a5dacce97caf48b6861fc38d144b67782.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b421cc23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b421cc23](https://forums.unrealengine.com/u/anonymous_user_b421cc23)\
**Post date:** [April 3, 2018, 12:56pm UTC](https://forums.unrealengine.com/t/get-progressbar-from-widget-component-and-update-progress/421601/7 "2018-04-03T12:56:04Z")

</div>

Worked, thanks.

---

<div class="post-metadata">

**Author:** ![maverik1337](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@maverik1337](https://forums.unrealengine.com/u/maverik1337)\
**Post date:** [October 27, 2019, 6:14pm UTC](https://forums.unrealengine.com/t/get-progressbar-from-widget-component-and-update-progress/421601/8 "2019-10-27T18:14:11Z")

</div>

@both of you: thank you so much for this. I’ve almost gone crazy because i wasnt able to get the ref of this progressbar… THANKS \<3
