Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Is there any way to determine the height of a static widget when you have wrapping turned on? I'm trying to put a scrollbar on it, and I need to set the height of the container, otherwise it seems to default to 0 and you can't see the text.

-Al

hi
Can you let me know what exactly do you want to do so that if possible i can
guide u with the same.
Thanks & Regards,
Paresh Purabhiya

hi
Can you let me know what exactly do you want to do so that if possible i can
guide u with the same.
Thanks & Regards,
Paresh Purabhiya

paresh wrote:hi
Can you let me know what exactly do you want to do so that if possible i can
guide u with the same.
Thanks & Regards,
Paresh Purabhiya
I have a long block of text in a static widget within a constraint container inside a form. I want to add a viewport and scrollbar to enclose them because the text is larger than the screen. It seems that the constraint container doesn't get properly sized though, so I need to set it manually.

paresh wrote:hi
Can you let me know what exactly do you want to do so that if possible i can
guide u with the same.
Thanks & Regards,
Paresh Purabhiya
I have a long block of text in a static widget within a constraint container inside a form. I want to add a viewport and scrollbar to enclose them because the text is larger than the screen. It seems that the constraint container doesn't get properly sized though, so I need to set it manually.

Hi,
Try using the IDECORATOR_SetWidget to set the scrollbar widget as a wrapper
over the static widget. also you could try creating an object of the.
WidgetConstraint and set the height of the container. actually it is used to set
the height of the widget that is placed inside the container. but i Think we can
even set the height of the container with it.
Thanks & Regards
Paresh Purabhiya

Hi,
Try using the IDECORATOR_SetWidget to set the scrollbar widget as a wrapper
over the static widget. also you could try creating an object of the.
WidgetConstraint and set the height of the container. actually it is used to set
the height of the widget that is placed inside the container. but i Think we can
even set the height of the container with it.
Thanks & Regards
Paresh Purabhiya

paresh wrote:Hi,
Try using the IDECORATOR_SetWidget to set the scrollbar widget as a wrapper
over the static widget. also you could try creating an object of the.
WidgetConstraint and set the height of the container. actually it is used to set
the height of the widget that is placed inside the container. but i Think we can
even set the height of the container with it.
Thanks & Regards
Paresh Purabhiya
When I skip the viewport and attach the scrollbar directly to the constraint container, it doesn't show any scrollbar. I can set the size of the container by hand and it works, but my objective is to avoid that since the size can vary based on the phone, and I hate to hard code magic numbers (didn't we all learn that in computer nerd school? :))
-Al

paresh wrote:Hi,
Try using the IDECORATOR_SetWidget to set the scrollbar widget as a wrapper
over the static widget. also you could try creating an object of the.
WidgetConstraint and set the height of the container. actually it is used to set
the height of the widget that is placed inside the container. but i Think we can
even set the height of the container with it.
Thanks & Regards
Paresh Purabhiya
When I skip the viewport and attach the scrollbar directly to the constraint container, it doesn't show any scrollbar. I can set the size of the container by hand and it works, but my objective is to avoid that since the size can vary based on the phone, and I hate to hard code magic numbers (didn't we all learn that in computer nerd school? :))
-Al

Use IWIDGET_GetPreferredExtent() on the static widget to find out how tall it wants to be, and then set the height of the constraint container based on that.
-Erik

Use IWIDGET_GetPreferredExtent() on the static widget to find out how tall it wants to be, and then set the height of the constraint container based on that.
-Erik

ebrowne wrote:Use IWIDGET_GetPreferredExtent() on the static widget to find out how tall it wants to be, and then set the height of the constraint container based on that.
-Erik
That doesn't work either...it returns about 19 when you first create it and set the text (the height of one line, I imagine), but then it jumps to 1360 when you put it in the viewport.
-Al

ebrowne wrote:Use IWIDGET_GetPreferredExtent() on the static widget to find out how tall it wants to be, and then set the height of the constraint container based on that.
-Erik
That doesn't work either...it returns about 19 when you first create it and set the text (the height of one line, I imagine), but then it jumps to 1360 when you put it in the viewport.
-Al