Page 1 of 1

Cursor on GLK19264

Posted: Tue Jan 31, 2012 8:16 pm
by Kayla
Can't seem to find command for blinking the cursor. No cursor in glk19264?

Posted: Wed Feb 01, 2012 9:08 am
by Clark
Hi Kayla,

Unfortunately, there is no cursor available on our graphic displays. However, you might create a custom block character to display at the end of written text, or an arrow to signify the current position in a menu. The graphic units offer a lot of possibilities.

Thanks,
Troy

Posted: Wed Feb 01, 2012 2:18 pm
by Kayla
Clark wrote:Hi Kayla,

Unfortunately, there is no cursor available on our graphic displays. However, you might create a custom block character to display at the end of written text, or an arrow to signify the current position in a menu. The graphic units offer a lot of possibilities.

Thanks,
Troy
Thanks Troy. I checked out the forum and found some menutest code for lk204 and tried it. I created a solid rectangle and have it in the left side of each line but I am still unsure where in the code I should put it so it would act as a cursor and would react to my keypad(down and up).

-Kayla

Posted: Thu Feb 02, 2012 9:37 am
by Clark
Hi Kayla,

The great thing about our displays is that they can do just about anything you can code, the trouble will come in figuring out what you want to code.

For a graphic cursor system, in a menu context only, with the C++ AppNote that I believe you are working with, this is just an idea that might get you started.
  • 1. Position the cursor at the second column before listing each of your menu options, leaving the first column blank.
    2. Create a row variable to keep track of your menu selection, initialize it to the first row.
    3. Create a function that draws a space or blank character to each row of the first column, and then draws the cursor character at the current row.
    4. Finally, update the row variable and call the cursor function every time a key is pressed, and once when initializing.
All the best,
Troy