Disappering scrollbar question

A PocketC native palm library offering native forms and assorted utilities

Postby Mikael on Sun Feb 27, 2005 2:39 pm

Oh boy...These get stranger every time.

I've compiled a test app using the simpleHandler() function for mapping a scrollbar to a field, and it works fine. However, when I transfer the code to my main app, one of two things happen. When I try with:


the scrollbar shows - though it disappears when I try to use it. Alternatively, when I add: 'FsetText(ScrollbarField,Fctl GETTSTR,startPosI));' either before or after: 'Fctl(SHOW,-1);', then the scrollbar fails to show.

I've also tried with the complexHandler() function, with the result that I have to move the scrollbar up and down a few times before the text begins to follow suit.

Any ideas as to where I'm going wrong?

Thanks in advance,

Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark

Postby jstadolnik on Mon Feb 28, 2005 3:17 am

First, get rid of Fctl(SHOW,-1). This is causing the scrollbar to get drawn even though there isn't enough text in the scroll field to support a scrollbar... that's why the scrollbar is disappearing.

Second, the field in question doesn't have any characters in it intially, and as such will remain hidden until it contains enough characters to need one.


The PToolboxLib guy.
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby Mikael on Mon Feb 28, 2005 12:35 pm

Thanks Joe,
It works fine now. I didn't realise that a scrollbar only appears when there is enough text to support it. It's one of those things I seen a million times, but never given any thought. Makes sense now I think about it. It's probably a bit like asking me how many stairs I have in my house. I see them every day, but I've no idea. I also realised that my bitmap was 160 x 160, instead of only ending where the field begins. Ooops. :?

Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark

Return to Pocket Toolbox

Who is online

Users browsing this forum: No registered users and 1 guest