Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spring Banner Contest! (2023)
(03-15-2023, 12:28 PM)mnrvovrfc Wrote:
(03-14-2023, 11:58 PM)bplus Wrote: Can the text labels be center aligned?

Must do it to a monospaced font. Trying to do it to a "conventional" font is a PITA. Must get the font widths of every single alphabet glyph, uppercase and lowercase in the least and do a smart computation out of it. I don't know, might be enough to sum the widths for a given phrase, divide by two and then take it from half the screen width? I'm not familiar anymore with the frequent text-centering algorithm.

That's the hard way. In QB64 you get the width of a string in pixels with _PrintWidth(myString$) and center it on pixel width of screen or pixel width of box area for label. But QBJS does not have all QB64 functions. It does have GUI though, thanks to dbox most recent mod one of my banners!
b = b + ...
Reply


Messages In This Thread
Spring Banner Contest! (2023) - by SMcNeill - 03-06-2023, 02:19 AM
RE: Spring Banner Contest! (2023) - by bplus - 03-06-2023, 01:50 PM
RE: Spring Banner Contest! (2023) - by Keybone - 03-06-2023, 05:41 PM
RE: Spring Banner Contest! (2023) - by dbox - 03-06-2023, 08:15 PM
RE: Spring Banner Contest! (2023) - by mnrvovrfc - 03-06-2023, 09:14 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-06-2023, 09:41 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-07-2023, 12:50 AM
RE: Spring Banner Contest! (2023) - by bplus - 03-07-2023, 03:39 AM
RE: Spring Banner Contest! (2023) - by bplus - 03-07-2023, 04:27 AM
RE: Spring Banner Contest! (2023) - by bplus - 03-07-2023, 05:06 AM
RE: Spring Banner Contest! (2023) - by aurel - 03-07-2023, 06:28 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-07-2023, 11:10 PM
RE: Spring Banner Contest! (2023) - by SMcNeill - 03-08-2023, 01:33 AM
RE: Spring Banner Contest! (2023) - by mnrvovrfc - 03-08-2023, 04:00 AM
RE: Spring Banner Contest! (2023) - by bplus - 03-08-2023, 01:39 AM
RE: Spring Banner Contest! (2023) - by bplus - 03-08-2023, 03:35 AM
RE: Spring Banner Contest! (2023) - by a740g - 03-08-2023, 05:12 PM
RE: Spring Banner Contest! (2023) - by mnrvovrfc - 03-08-2023, 05:22 PM
RE: Spring Banner Contest! (2023) - by dbox - 03-08-2023, 04:52 PM
RE: Spring Banner Contest! (2023) - by SMcNeill - 03-08-2023, 06:30 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-08-2023, 07:27 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-08-2023, 07:33 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-09-2023, 08:39 AM
RE: Spring Banner Contest! (2023) - by bplus - 03-08-2023, 08:20 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-09-2023, 07:48 AM
RE: Spring Banner Contest! (2023) - by dbox - 03-09-2023, 02:12 PM
RE: Spring Banner Contest! (2023) - by mnrvovrfc - 03-09-2023, 02:35 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-09-2023, 03:05 PM
RE: Spring Banner Contest! (2023) - by Sprezzo - 03-09-2023, 03:38 PM
RE: Spring Banner Contest! (2023) - by Sprezzo - 03-10-2023, 02:22 AM
RE: Spring Banner Contest! (2023) - by dbox - 03-10-2023, 12:55 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-10-2023, 04:08 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-10-2023, 05:05 PM
RE: Spring Banner Contest! (2023) - by dbox - 03-10-2023, 09:50 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-10-2023, 10:09 PM
RE: Spring Banner Contest! (2023) - by mnrvovrfc - 03-11-2023, 10:39 PM
RE: Spring Banner Contest! (2023) - by mnrvovrfc - 03-12-2023, 03:39 PM
RE: Spring Banner Contest! (2023) - by Sprezzo - 03-12-2023, 01:31 AM
RE: Spring Banner Contest! (2023) - by dbox - 03-12-2023, 02:02 AM
RE: Spring Banner Contest! (2023) - by SMcNeill - 03-12-2023, 02:39 AM
RE: Spring Banner Contest! (2023) - by bplus - 03-12-2023, 04:42 PM
RE: Spring Banner Contest! (2023) - by Sprezzo - 03-12-2023, 04:56 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-12-2023, 06:02 PM
RE: Spring Banner Contest! (2023) - by mnrvovrfc - 03-12-2023, 07:53 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-12-2023, 08:37 PM
RE: Spring Banner Contest! (2023) - by Sprezzo - 03-12-2023, 06:27 PM
RE: Spring Banner Contest! (2023) - by SMcNeill - 03-12-2023, 06:32 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-12-2023, 08:44 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-12-2023, 11:29 PM
RE: Spring Banner Contest! (2023) - by Sprezzo - 03-13-2023, 02:15 AM
RE: Spring Banner Contest! (2023) - by bplus - 03-13-2023, 04:07 AM
RE: Spring Banner Contest! (2023) - by bplus - 03-13-2023, 04:56 AM
RE: Spring Banner Contest! (2023) - by bplus - 03-13-2023, 03:15 PM
RE: Spring Banner Contest! (2023) - by vince - 03-13-2023, 07:47 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-13-2023, 08:22 PM
RE: Spring Banner Contest! (2023) - by Sprezzo - 03-13-2023, 09:31 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-13-2023, 10:59 PM
RE: Spring Banner Contest! (2023) - by Sprezzo - 03-14-2023, 06:27 AM
RE: Spring Banner Contest! (2023) - by bplus - 03-14-2023, 02:34 PM
RE: Spring Banner Contest! (2023) - by Sprezzo - 03-14-2023, 04:03 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-14-2023, 04:22 PM
RE: Spring Banner Contest! (2023) - by mnrvovrfc - 03-14-2023, 09:53 PM
RE: Spring Banner Contest! (2023) - by dano - 03-14-2023, 12:51 AM
RE: Spring Banner Contest! (2023) - by bplus - 03-14-2023, 01:56 AM
RE: Spring Banner Contest! (2023) - by mnrvovrfc - 03-14-2023, 03:52 AM
RE: Spring Banner Contest! (2023) - by dbox - 03-14-2023, 08:53 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-14-2023, 09:28 PM
RE: Spring Banner Contest! (2023) - by dbox - 03-14-2023, 11:02 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-14-2023, 11:19 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-14-2023, 10:58 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-14-2023, 11:41 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-14-2023, 11:58 PM
RE: Spring Banner Contest! (2023) - by mnrvovrfc - 03-15-2023, 12:28 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-15-2023, 01:30 PM
RE: Spring Banner Contest! (2023) - by dbox - 03-15-2023, 12:13 AM
RE: Spring Banner Contest! (2023) - by bplus - 03-15-2023, 12:36 AM
RE: Spring Banner Contest! (2023) - by dbox - 03-15-2023, 01:27 AM
RE: Spring Banner Contest! (2023) - by aurel - 03-15-2023, 11:23 AM
RE: Spring Banner Contest! (2023) - by dbox - 03-15-2023, 12:52 PM
RE: Spring Banner Contest! (2023) - by dbox - 03-16-2023, 11:56 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-17-2023, 10:07 PM
RE: Spring Banner Contest! (2023) - by aurel - 03-18-2023, 06:35 AM
RE: Spring Banner Contest! (2023) - by mnrvovrfc - 03-18-2023, 10:32 AM
RE: Spring Banner Contest! (2023) - by Sprezzo - 03-18-2023, 03:45 PM
RE: Spring Banner Contest! (2023) - by bplus - 03-18-2023, 04:56 PM
RE: Spring Banner Contest! (2023) - by Cobalt - 03-21-2023, 02:53 AM
RE: Spring Banner Contest! (2023) - by mnrvovrfc - 03-23-2023, 01:00 AM
RE: Spring Banner Contest! (2023) - by bplus - 03-23-2023, 01:42 AM



Users browsing this thread: 21 Guest(s)