FB_GUI V1.20.4 (New Release Oct 29, 2011)

User projects written in or related to FreeBASIC.
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

FB_GUI V1.20.4 (New Release Oct 29, 2011)

Postby BasicScience » Nov 02, 2008 21:14

An update to FB_GUI is now available at
http://sites.google.com/site/freebasicgui/Home

Updates to FB_GUI_V1.20.4 on 10/29/2011

* Fixed bugs in TextBoxCur to prevent "wrap-around"

* Fixed bug in Label Control to set Font.BackColor

* Revised code in Draw_PopUp, Close_PopUp - more robust
Help Manual Update for PopUp Forms.
____________________________________________________________
Updates to FB_GUI_V1.20.3 on 11/21/2010

* Modified TextBoxCur to work properly with keypad on extended
character keyboards.

* Modified DrawString_Custom to preserve prior status of FontSlot(1)

____________________________________________________________
Updates to FB_GUI_V1.20.2 on 11/07/2010

* Updated TextBox to have cursor capability. Mouse, arrow,
home, end key support to more cursor. Shift to select text.
Copy and Paste from clipboard (Win32 only). Automatic
horizontal text scrolling. No vertical scroll or multi-line input.

* Several small bugs fixed, CHM manual updated

An update to FB_GUI is now available at
http://sites.google.com/site/freebasicgui/Home
____________________________________________________________

Updates to FB_GUI_V1.20 on 03/28/2001

* Custom fonts are now all generated using xFont. All code using
GFX routines (FB Extended Library) has been removed. This
change tremendously improves portability, as several DLLs are no
longer required. The example excutable code will now run "as is"
with no additional software installation.

* New control added, Mouse_R_PopUp for generation of popup menu
from R mouse click


Updates to FB_GUI_V1.14 on 01/02/2010

* Modified Slider for vertical as well as horiz orientation

* Added fade-in option for pop_up windows

* Extensively revised code for drop_down menu. Changes are
transparent at user-level, but code is more robust and faster

* Several small bugs fixed (data_form, mouse_move_process)

* ScrollBar / Slider revised to reduce screen flicker, especially
with TextFileBox

_________________________________________________________

Minor bug for ListBox fixed on 9/21/09. Now V1.13.1

An update to FB_GUI is now available at
http://sites.google.com/site/freebasicgui/Home

FB_GUI V1.13 (Sep 13, 2009)

* ListBox added as a new control
* FB_GUI_Help updated / expanded

Image


An update to FB_GUI is now available at
http://sites.google.com/site/freebasicgui/Home

FB_GUI V1.12 (Aug 29, 2009)

* Help file extensively updated

* Removed limitation to .Draw_Control

* New variable added to control UDT (.index), which removes the restriction of only operating on Active_Ctrl.indx

* Data_Entry_Form modified to allow custom title, and bug fixed so it no longer creates a new popup form in memory with each instance

*Draw_Pop_Up modified so it no longer crashes if form title is null.




FB_GUI V1.11 (June 24, 2009)

1) Added DrawString_Custom() so fonts from the Xfont library can be accessed on-the-fly at run-time.

2) Added new function to toggle on/off flags for drop_down menu items

3) Manual updated

Image



FB_GUI V1.10 (April 21, 2009)

Added a new function, Data_Entry, that in a single line will generate a PopUP form with multiple TextBoxes for data entry. The user simply supplies a string array with the TxtBox labels / prompts and a second string array to set/receive the content of the textboxes

Here's a screen shot. All this is done with a single line call the Data_Entry in the FB_GUI package (See Data_Entry.BAS and .EXE in the Examples folder from FB_GUI V1.10.ZIP)

Data_Entry (FormLable(), FormContent(), Box_Width)


Image


**************************************************

FB_GUI V1.09 (Mar 31, 2009)

FB_GUI_HELP.CHM now much more complete.

Many new examples, small programs included.

Modifications & Bug Fixes:

1) Modfied Draw_PopUP to preserve control state = ctrl_status_disabled

2) Fixed bug in TextBox_Process for termination by ENTER vs Mouse Click

3) Modified Slider control so that the parameters .Slider_Incr and .Slider_Max are single; also added .Slider_Min (single)

4) Another modification to Drop_Down_Menus to prevent problem with underlying controls.

5) Modified TxtBox Ctrl, so that setting Label_Len = -1 will suppress showing Label in the TxtBox as a prompt.

6) Moved TextBox_Process() into the Poll_Event() routine in FB_GUI_Lib and removed the reset for Active_Ctrl.Indx.

***********************************************************

Addendum 02-02-2009
Inserted Sleep into each loop that polls for user input to prevent CPU hog (thanks phishguy).


FB_GUI_V1.08 uploaded 02-02-2009

1) Added Slider with Scroll Bar and Arrow Buttons.

2) Modified Mssg_Box function to accept a single text string, as well as a text string array for multi-line.

3) Modified PullDown Menu code so screen store / restore is limited to the size of the pull-down menu.

4)Modified SetVideo to enable 1, 2, or 3 - panel window (FB_GUI_SHELL example is 3-panel)

5) Added many new simple example apps / program stubs to peruse.

6) Help file updated... but still on-going



FB_GUI_V1.07 uploaded 01-06-2009

1) Revised Get_Input_PopUp
2) Added Text_To_File function (keybd to ASCII file, with CR/LF)
3) Revised PopUP Form.



Major changes to V1.04:

1 - Menu control modified so individual submenu items may be enabled/disabled.

2 - Much easier for user to code for Menu / SubMenu controls. See FB_GUI_HELP.CHM, which is still under construction but has a completed section on Menu / Submenu.

3 - Small icons can now be used as a prefix to a submenu item. This allows the user to place check mark or "X" to indicate an option selection or to show arrows (up/dn. lt/rt) as a hotkey.
Last edited by BasicScience on Oct 30, 2011 3:39, edited 23 times in total.
Merick
Posts: 1038
Joined: May 28, 2007 1:52

Postby Merick » Nov 09, 2008 0:41

There's an error in the demo somewhere - when I run it I just get a blank window divided into three areas, but with none of the gui controls or the menu bar showing.
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Nov 10, 2008 16:23

The project was developed and tested with WinXP SP2 and SP3. Perhaps there are problems with other OS versions. As should be obvious, the code runs in Windows, but not Linux.

Another common issue is that the program assumes Vera.TTF will be in the C:\windows\fonts\ folder.

Finally, I've added a new update as of today. There are enhancements and some bug fixes... but I don't think these prior bugs would cause the problem you mention.

http://sites.google.com/site/freebasicgui/Home
Merick
Posts: 1038
Joined: May 28, 2007 1:52

Postby Merick » Nov 12, 2008 2:05

Hmm.. it seems that for some reason I was missing vera.ttf in the fonts folder. found another copy and the demo is working now.
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Nov 12, 2008 6:49

Glad you got it to run.

I have discovered yet one more small glitch in FB_GUI V1.05. The problem relates to adding controls to a PopUp Form. If the controls are defined as "static" (i.e. the index is defined at the program onset and remains fixed) then everything works fine. If you create "dynamic" controls that are added later as an increment to Num_PopUp_Temp_Ctrl then when the PopUp Form is launch the the control state is set to Disabled (just like all the other controls that are not on the PopUP). It was an easy fix that I will release with V1.06.
rolliebollocks
Posts: 2655
Joined: Aug 28, 2008 10:54
Location: new york

Postby rolliebollocks » Nov 26, 2008 16:02

Uhm, quick question. Though, I realize this is no simple task, but it would be nice to be able to use the return button to advance the line number in a textbox +1.

I'm currently working on an editor which and your GUI seems best adapted to that.

I've been looking through your text parsing routine on a simple way of doing this. I'm not familiar enough with your GUI to make significant changes to it at the moment, so some tips would be welcome.

Thanx.

rb
rolliebollocks
Posts: 2655
Joined: Aug 28, 2008 10:54
Location: new york

Postby rolliebollocks » Nov 26, 2008 17:05

Also, does Box_Print allow for multiple files to be opened simultaneously?
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Nov 27, 2008 16:29

@Rolliebollocks

The TextBox control was designed to enable user input for a single text string that, in turn, would be assigned to single variable. As such, I didn't include detection of the ENTER key or CRLF in parsing the text string.

Moreover, like most forms that use TextBoxes for data entry, the TextBox control in FB_GUI, was designed to have the ENTER key terminate user entry, assign the TextBox input to the string variable, and shift the state of the TextBox from GotFocus/EnterData to Enabled but not selected. I would prefer to leave the TextBox control in this form.

There is a convenient way to show multi-line text messages to the user in a pop-up window. See SUB HINT in the FG_GUI routines. The text string sent to HINT may contain CRLF.

With regard to opening multiple files simultaneously, this can be done by using Ctrl_TxtFileBoX, but not with Box_Print (see the example in FB_GUI_Shell.BAS with the Show Txt File command button, which opens a second ASCII File while the file associated with Box_Print is open, too).

Finally, there is a bit of quirkiness with the scrollbar that is associated with Box_Print. If a PopUp window is active (and therefore the other controls not on the PopUP are set to Ctrl_Status_Disabled), while text is sent with Box_Print and the number of lines exceeds the window size (so a new scrollbar whoudl be generated)... then a there may be a failure to associate the ScrollBar Control with the TextFileBox Control. I have fixed this bug, which will come out soon on release 1.06
rolliebollocks
Posts: 2655
Joined: Aug 28, 2008 10:54
Location: new york

Postby rolliebollocks » Nov 27, 2008 17:16

Thanks, I'll try that.

One thing you might consider testing: How the gui would interact with something like a game loop. The gui seems to lose control if extra drawing/io subs are present in the main loop.
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Nov 28, 2008 3:51

I have tested the FB_GUI with mouse-driven cursors that display x,y values from plots, or that set limits for fairly complex nonlinear curve-fitting happening "live" with intensive recalculation / plotting of curves and the GUI did not get sluggish... even with about 30 active controls. As you have probably detected, the main loop polls by waiting for a ScreenEvent... which is pretty low-cost on the CPU.

One of the features I like most about a home-grown GUI rather than using the WinAPI is that it's easy to control program flow by jumping out of the Main Loop that polls the controls. That way, the procedure or subroutine can perform I/O or graphics intensive tasks... and not be bogged down by continuing to poll for all the controls. My approach for having a fast, responsive subroutine is to (1) savevid to preserve the screen, (2) use sub Disable on all the controls on the main window, (3) branch to a subroutine that can have a new, smaller subset of controls and for which you can easily write a new loop to poll for events limited to the new controls, (4) upon exit, kill all the temporary controls, and use sub Enable to activate the controls from the original main page, (5) RestVid to restore the screen.
rolliebollocks
Posts: 2655
Joined: Aug 28, 2008 10:54
Location: new york

Postby rolliebollocks » Dec 06, 2008 14:33

I've underlined a piece of text that you might want to look into. If you raise the textbox within > 10 or so pixels of the drop down menu, you can't select the option from the menu. Check it out...

Code: Select all

' Define TxtFileBox to scroll mssgs at bottom of screen
'
    Default_TxtFileBox = Num_Ctrl_Total
    With B[Num_Ctrl_Total]
        .Ctrl_Type = Ctrl_TxtFileBox
        .state = Ctrl_Status_Enabled
        .x1 = dxsmin
[u]        .y1 = dysmIN+4[/u]
        .x2 = dxsmax
        .y2 = Screen_Height-25
        .x_offset = 0
        .y_offset = 0
        .Label = "Mssg_TxtFileBox"
        .TxtStr = "Mssg_Tmp.txt"
        .V_Scroll_Enable = True
        .V_Scroll_Active = False
    END With
    Num_Ctrl_Total = Num_Ctrl_Total + 1
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

FB_GUI V1.06 Release

Postby BasicScience » Dec 07, 2008 16:40

Nice catch. You uncovered a bug in that whenever a drop_down menu overlapped a pre-existing control, then the mouse click triggered action by the pre-existing control... and not the menu selection. This has been fixed in FB_GUI V1.06 just released today. Other updates are listed below.

http://sites.google.com/site/freebasicgui/Home

V1.06 (December 7, 2008)
Fixed a bug with Drop_Down submenu selection when the submenu overlaps a pre-existing control

Fixed a glitch with dynamic controls added to a new PopUP form (previously forced to Ctrl_Status_Disabled)

Added a convenient programming tool. #Define DEBUG_ENABLED is a compiler option that can be set in FB_GUI.BI to print lots of useful Ctrl info to screen

Added an example program that uses a less complex user-interface than the comprehensive example: FB_GUI_SHELL.EXE[url][/url][url][/url]
rolliebollocks
Posts: 2655
Joined: Aug 28, 2008 10:54
Location: new york

Postby rolliebollocks » Dec 07, 2008 17:20

I think that was the problem originally with my graphics as well. They were overlapping other controls. I'm going to tinker around with using the gui with an in game loop.

What I really need is a multiline textbox. So far this is the one feature which doesn't exist in any of the home grown GUI's I've sampled. I don't know if you have the inclination to put that feature in. It does not appear to be as simple as it seems. I've looked into myself, and was intimidated by the prospects. I also despise GUI/menu design, and do anything to avoid it. But a notepad capable interface would be nice...

I'm thinking it might be possible to fuse your scrolling textfile shower with the input controls of the text entry box. But then you have to account for line #'s and column #'s and attune it the font offset...

I can see why no one wants to tackle this.

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

Postby BasicScience » Dec 07, 2008 21:22

@ RB,

You could modify FB_GUI_LIB.BAS to create a custom version of the TxtBox control that responds to ENTER with a new line, instead of closing focus on the TxtBox (as it now does).

It would be involved, but not that difficult. Look in SUB TextBox_Process (). Test for d = CHR(13) as the event that indicates the ENTER key was hit. If so, then pad the string with the CRLF character (defined in FB_GUI.BI). Next, you will need to edit SUB Parse_Text to search the string for CRLF as well as spaces as it now does. See SUB Hint for an example of how to search for CRLF in the middle of a text string. If a CRLF is detected, then force a new Txt_SubStr(i). Finally, remove the d = CHR(13) test in SUB TextBox_Process() that causes branching out of the routine.

The above approach would be more efficient than cracking into the TxtFileBox Ctrl (although this would be possible, too... and may be preferable if you want a file that contains a record of the keybd entries, or if the TxtString is really really really long).

Good Luck!
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Jan 07, 2009 0:45

Many new changes since V1.04 posted in the forum.

http://sites.google.com/site/freebasicgui/Home

Go to Download page.

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest