when I add this I get a light coloured bar (scrolled to the max kind off)
StandardScrollbar(0x12);

How would I achieve a dark coloured bar (like the one which is just filled out from top to bottom i.e. not scrollable indicating that all the visible view is complete) please.

I'd prefer to use StandardScrollbar for now as ones do not compile on my system at the moment and I wish to keep the addin small but pretty and scrollbar gives it nice edge I think.

Many thanks all
Are you saying that calling

Code:

StandardScrollbar(0x12);

Works? If so I would be surprised.
According to the definition of StandardScrollbar which can be found on the wiki http://prizm.cemetech.net/index.php/StandardScrollbar
the only parameter is a pointer for a variable with the type TStandardScrollbar however by reading the wiki you notice this is merely a typedef for an array with 0x12 (18 in decimal) entries and of type unsigned short. So you need to either use the typedef or an array of unsigned shorts with 18 elements and set the appropriate entries in the array then call that function with the first parameter being a pointer to the array. As for changing the color. What each entry does is not documented but at-least see if using the function properly helps us make some progress.
yes, very surprisingly it work but only for even numbers. I made the following code to test if there is a single integer (even only) I can pass to it get a desired result result quickly - when I run it n=on calculator and keep pressing any keys on it the adding redraws the scroll bar and puts the value of the the argument in the title/status bar. I have not been able to set up my pc properly to be able to compile with type TStandardScrollbar yet so was trying to use this as a work around.

int main() {
EnableStatusArea(0);
DefineStatusAreaFlags(3, SAF_BATTERY | SAF_TEXT | SAF_ALPHA_SHIFT, 0, 0);
int k;
int n = 0;
while (1) {
GetKey(&k);
StandardScrollbar(n);
char titleBuffer[120];
itoa(n, (unsigned char*)titleBuffer);
DefineStatusMessage((char*) titleBuffer, 1, 0, 0);
DisplayStatusArea();
n += 2;
}
return 0;
}

So it works but not flexible enough - your way is better but will only work once I fixed libraries etc. Thank you very much for your help
Just a hint noticing you are new here you should use the code tags here is an example of usage

Code:

[code]
Put your code here
[/code]

This will better preserve the formatting and make the code look nicer.
Thanks for you earlier help, ProgrammerNerd!

I stopped getting compiling errors for this after adding bits like
Code:
typedef unsigned short TStandardScrollbar[0x12];
and
Code:
   TStandardScrollbar work;
   work[16] = 6;// maximum indicator range of the standard scrollbar
   work[9] = 1;// current indicator position of the standard scrollbar
   StandardScrollbar( work );//   StandardScrollbar(0x12);
but wonder how and what to put as the arguments - for my current projects I just need one scroollbar which is fully filled from top to bottom please (i.e the whole page is displayed so scrolling will not go up or down) and another one which starts at the top but is scrollable a couple of pages. Unfortunately I cannot find an example helping me with with this and on prism wiki I can only see description of the two arguments I used in the code above but I haven't figured out to which values to set them yet.

Thanks in advance for all your help.
in case it helps somebody in the future, the full scrollbar i.e. filled from top to the bottom so not scrollable look can be achieved as follows:

Code:
   typedef unsigned short TStandardScrollbar[0x12];
   TStandardScrollbar work;
   work[16] = 6;// maximum indicator range of the standard scrollbar
   work[9] = 0;// current indicator position of the standard scrollbar
   StandardScrollbar( work );//   StandardScrollbar(0x12);
and increasing the maximum indicator range make it appear scrollable by that amount down (like value 16 below versus 6 above would make it scrollable down by 10 for example):

Code:
   typedef unsigned short TStandardScrollbar[0x12];
   TStandardScrollbar work;
   work[16] = 16;// maximum indicator range of the standard scrollbar
   work[9] = 0;// current indicator position of the standard scrollbar
   StandardScrollbar( work );


I'm still trying to figure out a good way of making the page to scroll with up and down keys (like for example on Version page of the System Manager) if someone could teach please I would be very grateful. I suspect current indicator position value should be incremented by 1 up and down but is there a routine dealing with the text on the page itself to go up and down too or do I need to reprint all or use some other methods please?

Looking forward to your help
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement