Get ProgressBar from Widget Component and Update Progress

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

Function within Actor:

235961-functionloadprogressbar.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

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.

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

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.

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

235966-possibilities.png

Try to find GenericProgressBar:

235967-possibilities-two.png

BP_HUD is your ProgressBarWidget.
Widget1 is your testWidget.
Then you will have access to the progress bar.

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

Worked, thanks.

@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