ISTATIC and scroll bars | developer.brewmp.com ISTATIC and scroll bars | developer.brewmp.com

Developer

ISTATIC and scroll bars

Forums:

Hello,

Okay, another one from me!

When you use an ISTATIC, for say, like a HELP screen, I notice some issues. One is that the text goes awfully close to the scroll bar at times. It literally abuts it. Also, for some handsets that scroll bar looks pretty thin.

Is there a way to control the distance from the text to the scroll bar?

Also, is there a way to control how thick that scroll bar is?

I'm looking to basically use the SDK as oppose to writing my own code to do this.

Thanks.

Ben

maybe a space bar would do? but then again this is very tedious.

maybe a space bar would do? but then again this is very tedious.

Using spaces won't help unless you are working on only a single device. Otherwise the difference in fonts and screen sizes between devices will screw things up.
We were lucky and our text looked good on all the phones (once we inset the text one pixel from the left side). I'd suggest that as long as there is at least one pixel of space between the text and the scroll bar you are fine.
Ed

Using spaces won't help unless you are working on only a single device. Otherwise the difference in fonts and screen sizes between devices will screw things up.
We were lucky and our text looked good on all the phones (once we inset the text one pixel from the left side). I'd suggest that as long as there is at least one pixel of space between the text and the scroll bar you are fine.
Ed

Insetting one pixel to the left does help. However, whether or not we get one pixel to right of the scroll bar seems like the luck of the draw. Which, when it does happen, it looks crappy. You would think you would have control of such things.
I am basically trying to avoid having to write a specialized HELP routine to display the help text.
Oh, one other question ... is there anyway of determining just how many scroll y positions exist when you use ISTATIC? They have that GoToLine routine, but it doesn't really seem to indicate limits. I ended writing a routine that explicitly goes through and estimates the newlines based on screen width. THe only problem with it is that on the phones, it is slow and causes a delay.
Thanks.
Ben

Insetting one pixel to the left does help. However, whether or not we get one pixel to right of the scroll bar seems like the luck of the draw. Which, when it does happen, it looks crappy. You would think you would have control of such things.
I am basically trying to avoid having to write a specialized HELP routine to display the help text.
Oh, one other question ... is there anyway of determining just how many scroll y positions exist when you use ISTATIC? They have that GoToLine routine, but it doesn't really seem to indicate limits. I ended writing a routine that explicitly goes through and estimates the newlines based on screen width. THe only problem with it is that on the phones, it is slow and causes a delay.
Thanks.
Ben

mobileben wrote:Insetting one pixel to the left does help. However, whether or not we get one pixel to right of the scroll bar seems like the luck of the draw. Which, when it does happen, it looks crappy. You would think you would have control of such things.
I just got hit with this. We got a "passed with notes" report from NSTL saying that one of our text screens had the word "cancel" misspelled as "cance".
Well, I looked, and the letter "l" is definitely in the IStatic text I'm displaying. I have noticed that text DOES get quite close to the scrollbar, and I'm guessing that the 1pix wide letter "l" is appearing either so close to the scrollbar that it blends into it, or worse yet, it's appearing BEHIND the scrollbar. >:^(
My coworker's first thought was to shrink the IStatic by one pixel on either side, or something, but (1) that MIGHT cause the text to wrap differently in THIS case, but it will end up cropping up in other IStatic displays, and/or on other handsets and (2) it WON'T prevent the text from butting up to the edge of the scrollbar, since the scrollbar itself will have moved one pixel from the edge, too!
UGH!
Any ideas? Thanks!

mobileben wrote:Insetting one pixel to the left does help. However, whether or not we get one pixel to right of the scroll bar seems like the luck of the draw. Which, when it does happen, it looks crappy. You would think you would have control of such things.
I just got hit with this. We got a "passed with notes" report from NSTL saying that one of our text screens had the word "cancel" misspelled as "cance".
Well, I looked, and the letter "l" is definitely in the IStatic text I'm displaying. I have noticed that text DOES get quite close to the scrollbar, and I'm guessing that the 1pix wide letter "l" is appearing either so close to the scrollbar that it blends into it, or worse yet, it's appearing BEHIND the scrollbar. >:^(
My coworker's first thought was to shrink the IStatic by one pixel on either side, or something, but (1) that MIGHT cause the text to wrap differently in THIS case, but it will end up cropping up in other IStatic displays, and/or on other handsets and (2) it WON'T prevent the text from butting up to the edge of the scrollbar, since the scrollbar itself will have moved one pixel from the edge, too!
UGH!
Any ideas? Thanks!

What is your code to setup the ISTATIC? You shouldn't see your text behind the scroll bar. It may touch it, but should not be behind it.

What is your code to setup the ISTATIC? You shouldn't see your text behind the scroll bar. It may touch it, but should not be behind it.

mobileben wrote:What is your code to setup the ISTATIC? You shouldn't see your text behind the scroll bar. It may touch it, but should not be behind it.
SETAEERECT(&rect, 0, 0, pApp->di.cxScreen, pApp->di.cyScreen);
ISTATIC_SetRect(pApp->pIStatic_history, &rect);
ISTATIC_SetText(pApp->pIStatic_history, NULL, pApp->WideMsg,
AEE_FONT_BOLD, AEE_FONT_NORMAL);
ISTATIC_Redraw(pApp->pIStatic_history);
ISTATIC_SetActive(pApp->pIStatic_history,TRUE);
Pretty basic!
-bill!

mobileben wrote:What is your code to setup the ISTATIC? You shouldn't see your text behind the scroll bar. It may touch it, but should not be behind it.
SETAEERECT(&rect, 0, 0, pApp->di.cxScreen, pApp->di.cyScreen);
ISTATIC_SetRect(pApp->pIStatic_history, &rect);
ISTATIC_SetText(pApp->pIStatic_history, NULL, pApp->WideMsg,
AEE_FONT_BOLD, AEE_FONT_NORMAL);
ISTATIC_Redraw(pApp->pIStatic_history);
ISTATIC_SetActive(pApp->pIStatic_history,TRUE);
Pretty basic!
-bill!

Looking closely at the IStatic display in question, the text is centered around the center of the screen.
This means that the scrollbar CAN (and in this case, with "l" in "cancel", DOES) overlap text.
It's as though the text centering code that IStatic uses internally doesn't account for the scrollbar!

Looking closely at the IStatic display in question, the text is centered around the center of the screen.
This means that the scrollbar CAN (and in this case, with "l" in "cancel", DOES) overlap text.
It's as though the text centering code that IStatic uses internally doesn't account for the scrollbar!

billkendrick wrote:Looking closely at the IStatic display in question, the text is centered around the center of the screen.
The VX6000 seems to be centering things properly.
I'll attach some mock-ups of what the bug looks like on the VX 4400, versus what the VX6000 does (the correct thing).
NOTE: I had initially said the CDM 8900 "does the right thing." I was mistaken, I was staring at a VX6000 which was doing the centering properly. In FACT, the CDM 8900 actually has the same bug I'm seeing on the VX 4400.
It's been a long day. ;)

billkendrick wrote:Looking closely at the IStatic display in question, the text is centered around the center of the screen.
The VX6000 seems to be centering things properly.
I'll attach some mock-ups of what the bug looks like on the VX 4400, versus what the VX6000 does (the correct thing).
NOTE: I had initially said the CDM 8900 "does the right thing." I was mistaken, I was staring at a VX6000 which was doing the centering properly. In FACT, the CDM 8900 actually has the same bug I'm seeing on the VX 4400.
It's been a long day. ;)