HP Forums

Full Version: How to arrange labels within the INPUT command?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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.


[attachment=1835] [attachment=1836]
(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?
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.

[attachment=1837] [attachment=1838]
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;
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.
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
Reference URL's