"Locate" in the program - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: Chatting and Socializing (https://staging.qb64phoenix.com/forumdisplay.php?fid=11) +--- Forum: General Discussion (https://staging.qb64phoenix.com/forumdisplay.php?fid=2) +--- Thread: "Locate" in the program (/showthread.php?tid=531) |
"Locate" in the program - Kernelpanic - 06-07-2022 Hello, is there a way to set the distance from the edge for the whole program with "Locate"? So far I've only found the way, see screenshot. Pretty laborious. Thanks! RE: "Locate" in the program - bplus - 06-08-2022 Are you trying to get the width of the screen you are using? If so it is _Width in text screens maybe even console, _Width/8 for graphics screens. (Assuming default font when get _Width and _Height) Likewise _Height gives you rows in text screens not console! and _Height/16 for graphics screens. So: DistanceToEdgeInChars = _Width/8 - ColumnYouAreAt ' for graphics screens or DistanceToEdgeInPixels = _Width - Xpixel ' for graphics RE: "Locate" in the program - Kernelpanic - 06-08-2022 Unfortunately, that doesn't work - or I'm doing something wrong. The input/output should be 2 columns from the margin. I guess I have to do it with "Locate". Thanks for the tip. RE: "Locate" in the program - bplus - 06-08-2022 Sorry, I do not really understand what you are after. If you are trying to control output printing onto the screen, you could look into Window or View Print. RE: "Locate" in the program - bplus - 06-08-2022 Right align a number input: Code: (Select All) _Title "Right align a number input to a column number" ' b+ 2022-06-08 RE: "Locate" in the program - Kernelpanic - 06-08-2022 Yes, apparently I really have a problem describing what I mean in English. I'll write the program to end and then show the result. Then one can see what I meant. RE: "Locate" in the program - bplus - 06-08-2022 Or you could keep me guessing and I could write up all kinds of utilities ;-)) RE: "Locate" in the program - RhoSigma - 06-08-2022 (06-08-2022, 08:39 PM)Kernelpanic Wrote: Yes, apparently I really have a problem describing what I mean in English. Oder beschreibe dein Problem einfach mal auf deutsch, vielleicht kan ich dir ja weiterhelfen. Schon mal ein paar Infos vorweg: - LOCATE ist Satzaktiv, nicht modal, d.h. ein LOCATE für ein PRINT (USING) - Wenn du immer 2 Zeichen Rand haben willst, dann kannst du entweder deine PRINTs mit TAB kombinieren, z.B. TAB(2);PRINT USING .... - oder füge einfach 2 Leerzeichen am Anfang der Ausgabetexte ein: " Fertigungsmaterial" " +8% Gemeinkosten...." " -----------------------" RE: "Locate" in the program - Pete - 06-09-2022 (06-07-2022, 08:04 PM)Kernelpanic Wrote: Hello, is there a way to set the distance from the edge for the whole program with "Locate"? Is this what you re looking for? Code: (Select All) PRINT "horse" Pete RE: "Locate" in the program - bplus - 06-09-2022 (06-09-2022, 01:50 AM)Pete Wrote:(06-07-2022, 08:04 PM)Kernelpanic Wrote: Hello, is there a way to set the distance from the edge for the whole program with "Locate"? And extending that symmetrically the other way: Code: (Select All) Print "horse" |