Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Scrollbar width not changing - PtMultiText and Pt_ARG_SCROLLBAR_Y_WIDTH: (9 Items)
   
Scrollbar width not changing - PtMultiText and Pt_ARG_SCROLLBAR_Y_WIDTH  
I have a PtMultiText widget where I increased the width of the vertical scrollbar using the resource editor in PhAB.

However, when I run the program and the window displays, the scrollbar is the default size.

Is there something else that could be forcing the scrollbar back to the default size?

The PtMultiText widget is under a grid layout policy and it grows to fill the window.  The window in PhAB is small, but 
it is always displayed full screen when the app runs.

Thanks for any help/insight.

Kendall
Re: Scrollbar width not changing - PtMultiText and Pt_ARG_SCROLLBAR_Y_WIDTH  
This is a bug. Here is a workaround:

Attach a 'realized' callback to your multitext and link it to this callback:

int
mtext_realize_cb( PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t *cbinfo )
{
	PtSetResource( widget, Pt_ARG_SCROLLBAR_Y_WIDTH, 22, 0 );
	return Pt_CONTINUE;
}

I set it to 22, you will put your number(s).
Re: Scrollbar width not changing - PtMultiText and Pt_ARG_SCROLLBAR_Y_WIDTH  
Thank you for the quick response, however that solution is not working for me.

I set a breakpoint and debugged the code to make sure the realized callback is actually being called and that the code 
is processed, but the width of the scrollbar still does not change.  (I set it to 25)

> This is a bug. Here is a workaround:
> 
> Attach a 'realized' callback to your multitext and link it to this callback:
> 
> int
> mtext_realize_cb( PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t *
> cbinfo )
> {
> 	PtSetResource( widget, Pt_ARG_SCROLLBAR_Y_WIDTH, 22, 0 );
> 	return Pt_CONTINUE;
> }
> 
> I set it to 22, you will put your number(s).


Re: Scrollbar width not changing - PtMultiText and Pt_ARG_SCROLLBAR_Y_WIDTH  
What version of QNX are you using?
I attached a small sample app. Does it work for you?
Attachment: Compressed file PtMultiTextScrollBarWidth_ab.tgz 5.47 KB
Re: Scrollbar width not changing - PtMultiText and Pt_ARG_SCROLLBAR_Y_WIDTH  
I am using 6.5.0

It turns out that the layout type for the window is affecting this issue. 

I have a Grid Layout for the window. (2 columns) 
The PtMultiText is set to: 
Horizontal Span: 2 
Flags: HORIZONTAL GRAB | VERTICAL GRAB | HORIZONTAL ALIGN FILL | VERTICAL ALIGN FILL 

Just so you know, I also went on and logged a case (00110671 ) regarding this issue in the Support Portal of QNX.  

Thank you,
Kendall
Re: Scrollbar width not changing - PtMultiText and Pt_ARG_SCROLLBAR_Y_WIDTH  
Aha. You may want to try to "reset the width" in Pt_CB_LAYOUT callback on Pt_LAYOUT_DONE subtype.
Re: Scrollbar width not changing - PtMultiText and Pt_ARG_SCROLLBAR_Y_WIDTH  
That solved the issue.  Thank you.

> Aha. You may want to try to "reset the width" in Pt_CB_LAYOUT callback on 
> Pt_LAYOUT_DONE subtype.


Re: Scrollbar width not changing - PtMultiText and Pt_ARG_SCROLLBAR_Y_WIDTH  
I've raised PR 107519 for this problem.
Re: Scrollbar width not changing - PtMultiText and Pt_ARG_SCROLLBAR_Y_WIDTH  
Hi,

attached is an experimental build of libph for qnx650 / x86 that should fix the issue. If you like, you could try if 
that fixes the issue. Seemed to work for me...

Cheers,
Thomas
Attachment: Compressed file libph.so.zip 568.68 KB