Slider length in GeDialog.AddEditSlider [SOLVED]

On 03/03/2015 at 06:38, xxxxxxxx wrote:

I've been using,


but I don't see how you set the length of the numeric entry field and the length of the slider.
In the picture here: it shows the slider taking up most of the length.

How do I achieve that?



On 03/03/2015 at 09:19, xxxxxxxx wrote:

You can adjust the alignment and scaling of the slider by passing the appropriate flags as second parameter. For your case you can pass BFH_SCALE for horizontal scaling.

On 03/03/2015 at 16:11, xxxxxxxx wrote:

I don't think that does what I asked.
I'm asking how to set the ratio of the length of the edit field, to the length of the slider.
I haven't been able to get a short edit field with a long slider area like in the picture.

On 04/03/2015 at 02:03, xxxxxxxx wrote:

Ah ok sorry then I got you wrong. Have you tried setting the optional initw parameter?

On 16/03/2015 at 10:58, xxxxxxxx wrote:

Hi terrachild,

I'd like to know if you tried what Satara suggested, or otherwise found a solution to your problem?

Joey Gaspe
SDK Support Engineer

On 17/03/2015 at 12:13, xxxxxxxx wrote:

Yes I tried it:

AddEditSlider(TAB_CAMERA_BACKGROUND_TRANSPARENCY, flags = c4d.BFH_SCALE, initw=400, inith=12)

And all that does is set the length of the entire gizmo.
In this case it made it equal to 400, but the numeric entry portion took up the majority of the length.
How do you set it so the slider takes up the majority of the length?

On 20/03/2015 at 16:15, xxxxxxxx wrote:

Hi terrachild,

I tried out various possibilities and found the following, please try it out and let me know:


It seems that by changing the flag to BFH_SCALEFIT, yet reducing the width to 30, the slider is as long as is reasonably possible, yet the numeric entry portion is just big enough to display 100 when set to that value, with the slider all the way to the right.  If I increase the width with the same flag, the numeric part proportionally grows as the slider shrinks.

I hope that helps!  Please let me know if it does, and if it doesn't, I'll need your code that sets up that part of the UI to understand the exact context.

Joey Gaspe
SDK Support Engineer

On 26/03/2015 at 08:51, xxxxxxxx wrote:

Wow, the secret code!
I've struggled with that for months.
Why isn't this documented somewhere?

Just to make clear for others: If you set the flag to 'c4d.BFH_SCALEFIT', then 'initw=25' (or any other values) works to adjust the ratio of the numeric portion length to the slider length.



On 27/03/2015 at 10:02, xxxxxxxx wrote:

Hi Chris,

Glad to hear it works, and thanks for letting us know!  I'll admit, setting up UI elements to scale properly, especially when they have more than one element like in this case, is not obvious.  I will see about getting this documented properly.  I admit I had to use trial and error to find the solution.  The screenshot in the help docs convinced me there had to be a way, assuming it was showing an actual EditSlider.  I can see why you could have been stuck for a long time on this problem, as the combinations you have to try are not obvious.  I will set this topic as solved.

Joey Gaspe
SDK Support Engineer