Page 1 of 1

PostPosted: Sun Feb 27, 2005 2:39 pm
by Mikael
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,


PostPosted: Mon Feb 28, 2005 3:17 am
by jstadolnik
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.

PostPosted: Mon Feb 28, 2005 12:35 pm
by Mikael
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. :?