Post Reply 
widgets
09-08-2017, 06:39 AM
Post: #1
widgets
I discovered a useful video describing how to use the input command to create a form in the prime. However, it doesn't cover a few things.
First, the video i'm referring to is here:
https://www.youtube.com/watch?v=4rObQpO5DTY

The checkbox option, if you put in a value other than zero, the checkboxes would be a single selection where only one box could be selected, so you'd give each one a value of 1, 2 or 3, for example.
e.g. Where any can be selected, the code is:
{tm,0,{90,10,4}},
{wm,0,{90,10,5}},
{sb,0,{90,10,6}},
....and when only one can be selected, it becomes...
{tm,1,{90,10,4}},
{wm,2,{90,10,5}},
{sb,3,{90,10,6}},
This shows how to make all your checkboxes have a selection...but what if you have more than one group of checkboxes on the same form?
So, my first question is...is it possible to have more than one group of checkboxes where only one is selectable? ....on the same form I mean? If so, how is that done?

My second question is a bit bigger....there are many other widgets I've seen, such as a slider in the geometry app. If I want to add a slider to one of my forms, how do I do it?
Also, I've seen a progress slider when loading something, e.g. the codeviewer app, has a progress slider displayed when loading the code to view....how do I do that?

i.e. Is there any link where all the possible widgets are described? Also, is there any decent place where the input command is described in detail, with examples if possible?
I'm trying to figure out how to use all possible widgets as I'm giving serious consideration to developing an SDK app where these widgets can be defined in a visual way and then the app will generate the code to create them.....first step is figuring out how they are displayed and used.
Thanks in advance...
-Donald
Find all posts by this user
Quote this message in a reply
09-08-2017, 07:43 AM
Post: #2
RE: widgets
From what I've seen in various sample code, the slider and progress bar are done manually...i.e. drawn with custom handling of the mouse to move the slider, etc, etc... Is this correct, or does a slider function exist in the firmware?
Thx
Find all posts by this user
Quote this message in a reply
09-09-2017, 03:17 AM
Post: #3
RE: widgets
(09-08-2017 06:39 AM)webmasterpdx Wrote:  The checkbox option, if you put in a value other than zero, the checkboxes would be a single selection where only one box could be selected, so you'd give each one a value of 1, 2 or 3, for example.
e.g. Where any can be selected, the code is:
{tm,0,{90,10,4}},
{wm,0,{90,10,5}},
{sb,0,{90,10,6}},
....and when only one can be selected, it becomes...
{tm,1,{90,10,4}},
{wm,2,{90,10,5}},
{sb,3,{90,10,6}},
This shows how to make all your checkboxes have a selection...but what if you have more than one group of checkboxes on the same form?
So, my first question is...is it possible to have more than one group of checkboxes where only one is selectable? ....on the same form I mean? If so, how is that done?

To select only one box in a group, it would look like this:
{tm, 3, {90, 10, 4}} // This indicates how many checkbox are grouped next
{wm, 0, {90,10,5}},
{sb, 0, {90, 10, 6}},

(09-08-2017 06:39 AM)webmasterpdx Wrote:  i.e. Is there any link where all the possible widgets are described? Also, is there any decent place where the input command is described in detail, with examples if possible?
I'm trying to figure out how to use all possible widgets as I'm giving serious consideration to developing an SDK app where these widgets can be defined in a visual way and then the app will generate the code to create them.....first step is figuring out how they are displayed and used.

The control structures: IF, CASE, REPEAT, FOR. And the commands WAIT (-1) or MOUSE / GETKEY / WAIT. All of them allow you to create any kind of widgest, there is no limit other than the one you put yourself.

(09-08-2017 07:43 AM)webmasterpdx Wrote:  From what I've seen in various sample code, the slider and progress bar are done manually...i.e. drawn with custom handling of the mouse to move the slider, etc, etc... Is this correct, or does a slider function exist in the firmware?

It is manual, preferably using WAIT(-1).

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
09-09-2017, 05:28 AM
Post: #4
RE: widgets
Ah, that works... putting the number of boxes in the second position in the list works.
However, be aware of one caveat. It does allow multiple groups, but groups don't work across page boundaries (when you pass row 7 it goes to the next page).

Thanks
-Donald
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)