container control setting height at runtime

I am setting height of a container control at runtime to 64000.

it sets the height to negative.

any way to

In what scenario do you need your container control to be 889 inches tall?
Apparently the CC height value has “rolled over” thus you are getting negative values. If you input unrealistic parameters, you may get unrealistic results.

[quote=131864:@shahid darbar]I am setting height of a container control at runtime to 64000.

it sets the height to negative.

any way to[/quote]

What is the window height ?

if the height is still a 16 bit signed integer like it was 10 years ago, it’ll turn negative if it’s over 32767.

hi,

I need the height to be 64000 in this scenario.

I have created a container control, which acts like a combo box.
the goal was to display a colour next to the name of the colour and get it working on mac and pc.

now, each row inside is 40px high, and we have like 8000 colours to display. so we increase the height of
the container inside our main container and then scroll using mouse wheel and the scrollbar control.
(hope i don’t sound stupid any more)

but i encountered the above problem and seems there is no way around.

[quote=134185:@shahid darbar]hi,

I need the height to be 64000 in this scenario.

I have created a container control, which acts like a combo box.
the goal was to display a colour next to the name of the colour and get it working on mac and pc.

now, each row inside is 40px high, and we have like 8000 colours to display. so we increase the height of
the container inside our main container and then scroll using mouse wheel and the scrollbar control.
(hope i don’t sound stupid any more)

but i encountered the above problem and seems there is no way around.[/quote]

Christian just told you the max height is the limit of the integer value of height : 32767. Since an integer starts producing negative values above, that explains what you see.

Seems you want to display sort of a Pantone chart. Why not use a listbox with 8000 rows, each 40 px high (DefaultRowHeight), and use the CellBackgroundPaint event to color each row the way you would your container control ?

It will scroll just as nicely and you will not have the integer limit.

ok, makes sense michel.

[quote=134185:@shahid darbar]hi,

I need the height to be 64000 in this scenario.

I have created a container control, which acts like a combo box.
the goal was to display a colour next to the name of the colour and get it working on mac and pc.

now, each row inside is 40px high, and we have like 8000 colours to display. so we increase the height of
the container inside our main container and then scroll using mouse wheel and the scrollbar control.
(hope i don’t sound stupid any more)

but i encountered the above problem and seems there is no way around.[/quote]

at 72 dpi this is 888+ inches tall on screen

Norman, it sounds like he’s trying to make a Menu like the one in RB when you are setting the super of a class in the Project tab.

a 64000 pixel one ?
… don’t think so

I quickly tried the concept of the color chart with a listbox, it works pretty fine…