Author Topic: Is this a bug?  (Read 4841 times)

0 Members and 2 Guests are viewing this topic.

Nicola

  • Guest
Re: Is this a bug?
« Reply #60 on: September 16, 2020, 02:46:41 AM »
@Charles
 Reply #58

Great!
Is this good for both console and gui edit-text?

JRS

  • Guest
Re: Is this a bug?
« Reply #61 on: September 16, 2020, 03:06:21 AM »
sprintf is generating a formatted string that can be used in any UI environment.

Charles Pegge

  • Guest
Re: Is this a bug?
« Reply #62 on: September 16, 2020, 04:21:22 AM »
Yes Nicola,

But with GUI edit boxes showing aligned data, you will need to set a monospaced typeface like "Courier" or "Lucida Console"

Code: [Select]
...
  function SetFont(sys *hwnd,n,height,width,weight,string fontname) as sys
  ========================================================================
  indexbase 1
  sys hFont,i
  hfont=CreateFont( height,width,0,0,weight,0,0,0,0,0,0,0,0,fontname)
  int i
  for i=1 to n
    SendMessage hwnd(i),WM_SETFONT,hfont,0
  next
  return hFont
  end function
...

    hFont=SetFont(hchw[1],6,13,9,400,"Lucida console")


JRS

  • Guest
Re: Is this a bug?
« Reply #63 on: September 16, 2020, 06:41:00 AM »
I tend to use grid controls for formatted columns of data in a GUI environment using the controls alignment properties to do the work.