FB_GUI V1.20.5 (New Release Dec 19, 2019)

Headers, Bindings, Libraries for use with FreeBASIC, Please include example of use to help ensure they are tested and usable.
Post Reply
phishguy
Posts: 1201
Joined: May 05, 2006 16:12
Location: West Richland, Wa

Post by phishguy »

Your GUI is looking really good. I do have a problem that the demos use fonts that weren't included in the zip file.
BasicScience
Posts: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

oops, my bad. I have the required fonts and meant for them to be in the examples folder. Will upload in a few minutes.
BasicScience
Posts: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

Required xFont files now included with examples on FB_GUI site.
phishguy
Posts: 1201
Joined: May 05, 2006 16:12
Location: West Richland, Wa

Post by phishguy »

There is a minor issue with the text box with V-scroll. If you hold down a key (or have a string without spaces) and exceed the textbox width, the text will start displaying outside the text box.

Also, the fonts in some of the compiled examples are looking for a different path. That's not a big problem. But you might want to clear that up so that your demos work when extracted from the demo zip file.
BasicScience
Posts: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

@phishguy,

Thanks for taking the time to test the demos.

With regard to the text overrun with the vertical scroll bar... you explored a scenario I had not considered. Namely, a long string of characters with no spaces. Obviously the routine checks for space chr to perform a line break. Not sure I'll get around to fixing this one... because with "real" input (i.e. sensible text) it's unlikely to come across a word some long that the text will over-run.

The latest version for the Demos should look in : (a) the current directory, then (b) C:\Program Files\FreeBASIC\inc\xfont\ for the xFont files. It has been laborious to debug... because I need to load the programs on a machine w/o any of my "stuff" loaded. There has been some shifting of versions, but hopefully now all on the website should work well.

Anyway, cheers and thanks for the feedback.
BasicScience
Posts: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

Ack! Sorry FB_GUI fans... small error found in specification for path to font director in routine DrawString_Custom. Fixed at 6:45 PM CST. Correct zip file now on the download site as FB_GUI.V1.20a.ZIP (notice the "a")
phishguy
Posts: 1201
Joined: May 05, 2006 16:12
Location: West Richland, Wa

Post by phishguy »

With regard to the text overrun with the vertical scroll bar... you explored a scenario I had not considered. Namely, a long string of characters with no spaces. Obviously the routine checks for space chr to perform a line break. Not sure I'll get around to fixing this one... because with "real" input (i.e. sensible text) it's unlikely to come across a word some long that the text will over-run.

However unlikely it may be, a typical end user will invariably type something unexpected (end users aren't always sensible). So, it is best to try to take into account any possible user input.
Doggie
Posts: 6
Joined: Apr 13, 2010 4:43

Post by Doggie »

error 24: File not found, "xfont.BI" in '#include once "xfont.BI"'



I can't manually find it either. Windows7
phishguy
Posts: 1201
Joined: May 05, 2006 16:12
Location: West Richland, Wa

Post by phishguy »

@Doggie,
You need to download the xfont.bi file. Here is the link:
http://xaviorsoft.freebasic.net/fbproduct/
Doggie
Posts: 6
Joined: Apr 13, 2010 4:43

Post by Doggie »

Thanks. Now I get this
stuff/FB_GUI/Help_Examples/xfont.BI(15) error 137: Suffixes are only valid in -lang deprecated or fblite or qb in 'Const True = -1, False = 0'

Sorry to be a nuisance but I am totally NEW to FB...
BasicScience
Posts: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

@ Doggie,

The error occurs because the CONSTs TRUE and FALSE are defined in two BI files (xfont.bi and fb_gui.bi). A quick fix is to comment out this line in xfont.bi

' Const True = -1, False = 0

I'll clean this up for future releases and add xfont.bi to the zip file.

BasicScience
BasicScience
Posts: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

@ Doggie and others.

The problem is now fixed. The issue was a redundancy in defining the boolean constants TRUE/FALSE by both xfont.bi and windows.bi (actually windef.bi within windows.bi). xfont.bi does not perform error-checking to determine if these constants have previously been defined. Therefore if windows.bi precedes xfont.bi in the code, then the compiler error is generated. I don't have access to modify xfont.bi so FB_GUI.BI has been modified to call xfont.bi before windows.bi. The latest version of the FB_GUI package is 1.20.1 and is available at this link:
http://sites.google.com/site/freebasicgui/Home

BasicScience
bfuller
Posts: 362
Joined: Jun 02, 2007 12:35
Location: Sydney, Australia

Post by bfuller »

I am stuck here:

Compiler output:
C:\FreeBasic\inc\FB_GUI\FB_GUI_LIB.Bas(4367) warning 35(0): No newline at end of file
C:\FreeBasic\bin\win32\ld.exe: cannot find -lxfont

I have Xfont in my \inc folder (that took me a while to sort out) but now I would appreciate a hint on what to do about this -lxfont thing please. I'm trying to quickrun (F5) the Slider.bas example

I can run the slider.exe provided in the examples without problem.

Thanks in advance
BasicScience
Posts: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

Xfont uses a compiled library. The linker cannot find the library on your machine. You must have libxfont.a in your \lib\win32 folder.

Also, you can change the location of the font files (*.xf generated by xfconv.exe) by resetting the shared string variable for the font path. See

Font_Path = "C:\program files\freebasic\inc\xfont\" in the FB_GUI.BI file.
SotSvart
Posts: 262
Joined: May 27, 2005 9:03
Location: Norway
Contact:

Post by SotSvart »

Is anyone else having trouble compiling and running the example files? The pre compiled examples works as expected, but when I compile and run them myself they always crash when I select the "File" in the menu. Selecting "Help" in the menu works.

Edit: Using FB 0.21.1 and FB_GUI v1.20.1 on WinXP
Post Reply