Post Reply 
How to arrange labels within the INPUT command?
03-26-2015, 07:35 PM (This post was last modified: 03-27-2015 05:25 AM by Spybot.)
Post: #1
How to arrange labels within the INPUT command?

Hi Everyone!

I'm trying to display some labels within the INPUT command... everything is fine, except for the fact that I need those labels to show on the right side of the box(just like in the LINEAR SOLVER APP) , I know the default is to show them on the left side of the box. So, Is there a way to show them to the right?

Thank you.


       

Spybot.
Find all posts by this user
Quote this message in a reply
03-26-2015, 07:52 PM (This post was last modified: 03-26-2015 07:53 PM by toml_12953.)
Post: #2
RE: How to arrange labels within the INPUT command?
(03-26-2015 07:35 PM)Spybot Wrote:  
Hi Everyone!

I'm trying to display some labels within the INPUT command... everything is fine, except for the fact that I need those labels to shown on the right side of the box(just like in the LINEAR SOLVER APP) , I know the default is to show them on the left side of the box. So, Is there a way to show them to the right?

Thank you.



Does adding leading spaces work?

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
03-26-2015, 11:07 PM (This post was last modified: 03-27-2015 05:26 AM by Spybot.)
Post: #3
RE: How to arrange labels within the INPUT command?
This is my code:

EXPORT TEST()
BEGIN
LOCAL A;
INPUT({{A,[0],{50,10,2}}},"title","Label"); //NO help!
END;


the result is shown in screenshot #1 but I'd like to achieve something like the screenshot # 2 without PhotoShop.

       

Spybot.
Find all posts by this user
Quote this message in a reply
03-27-2015, 11:38 AM (This post was last modified: 03-27-2015 11:43 AM by DrD.)
Post: #4
RE: How to arrange labels within the INPUT command?
Arranging labels independently may not be a built in feature of the INPUT command, but in a desparate act of dogged determination you could embellish this skeleton idea to possibly achieve what you are after, (this is just a 'food for thought' notion, not a fully working example):

Code:

EXPORT Test()
BEGIN
LOCAL A:=0;
local black:=rgb(0,0,0),
      cyan:=rgb(245,250,255),
      white:=rgb(255,255,255),
      blue:=rgb(0,0,255);
local title:="title",label:="Label"; 

rect_p(G0,0,0,320,240,cyan);                   //  Clear G0 graphic screen.
rect_p(G0,0,0,320,18,black,blue);              //  Clear G0 "title"
rect_p(G0,132,107,155,125,black,white);     //  Clear a rectangle for use as an input field

textout_p(title,G0,160-3*length(title),2,3,white,40,blue);  //  Display "title" text
textout_p(label,G0,160,109,3,black,50,cyan);                //  Display "Label" on RIGHT side the input field <the main objective!>
textout_p(IP(A),G0,135,109,3,black,9,white);                //  This just forces "0" into the input field, as an example 
textout_p("Enter value for Label",G0,0,204,3,black,320,cyan);  //  Help line shows just above a soft button choices 

drawmenu("Edit","","","","Cancel","OK");    //  This is a dummy soft button field.

wait(-1); // displays the above activity for awhile
END;
Find all posts by this user
Quote this message in a reply
03-27-2015, 03:20 PM (This post was last modified: 03-27-2015 03:49 PM by Spybot.)
Post: #5
RE: How to arrange labels within the INPUT command?
Hi Thank you for your answer DrD!

I admit that it is a very clever and informative approach, it definitely shows more that I expected, now I got a clear notion not only on how the INPUT command really works at this moment, but also how other commands work.

I appreciate you took the time to generate this answer.

Spybot.

Spybot.
Find all posts by this user
Quote this message in a reply
10-06-2017, 09:51 AM
Post: #6
RE: How to arrange labels within the INPUT command?
Bonjour,

I am looking to find a way to input some data in my defined screen with rect_p() and
textout_p.

I tried the code above, but it does not work as I want and require wait(0) !

Is it a way to accomplish easily this with INPUT.

note : INPUT command bypass my defined screen with standard screen !...

Thanks a lot for your attention.
DL
Find all posts by this user
Quote this message in a reply
Post Reply 




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