• Welcome to PlanetSquires Forums.
 

WinFBE v3.0.3 (November 24, 2022)

Started by Paul Squires, November 24, 2022, 08:32:42 AM

Previous topic - Next topic

Paul Squires

https://github.com/PaulSquires/WinFBE/releases

Version 3.0.3 (November 24, 2022)

Editor:
- Fixed bug whereby SaveAs dialog would appear for Quick Run files during the compiling phase.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Petrus Vorster

Hi All

This is a frivolous question, but here goes.

On the BUTTON, if you place a 48X48 Image AND add TEXT to bottom center of the button, you need to elongate the button a bit to make everything fit nicely.
But then the image has a large border to the top of the button. I saw a setting for Image Margin, but I do not see anything happen if I change it.

Can one reduce the top margin for the Image on the button, or am I again missing the obvious?

-Have a great day gents.

--Peter
-Regards
Peter

Paul Squires

Hi Peter,

I took a quick look. Two things: (1) It looks like Image Margin only takes effect at runtime. Changes to that value do not seem to be reflected at design time within the visual designer; (2) Looks like I have not exposed the SetImagePos (or the ImagePos property) from Jose's underlying CXpButton class that I use for buttons in WinFBE. I need to do that so that you can properly position the image within the button.

' ========================================================================================
' Sets the position of the image
' Parameters:
' - nPos = Position.
'     %XPBI_NONE = &H0                                    ' // No image
'     %XPBI_LEFT = &H1                                    ' // Left (default)
'     %XPBI_RIGHT = &H2                                   ' // Right
'     %XPBI_CENTER = &H4                                  ' // Center
'     %XPBI_VCENTER = &H8                                 ' // Vertically centered
'     %XPBI_TOP = &H10                                    ' // Top
'     %XPBI_BOTTOM = &H20                                 ' // Bottom
'     %XPBI_ABOVE = %XPBI_TOP OR %XPBI_CENTER             ' // Above the text
'     %XPBI_BELOW = %XPBI_BOTTOM OR %XPBI_CENTER          ' // Below the text
'     %XPBI_CENTERCENTER = %XPBI_CENTER OR %XPBI_VCENTER  ' // Center-center (no text)
' - fRedraw = TRUE or FALSE (redraws the button to reflect the changes)
' ========================================================================================
PRIVATE SUB CXpButton.SetImagePos (BYVAL nPos AS LONG, BYVAL fRedraw AS LONG = FALSE)
   m_ImagePos = nPos
   IF fRedraw THEN this.Redraw
END SUB
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

Quote from: Petrus Vorster on November 24, 2022, 02:05:53 PMOn the BUTTON, if you place a 48X48 Image AND add TEXT to bottom center of the button, you need to elongate the button a bit to make everything fit nicely.
But then the image has a large border to the top of the button. I saw a setting for Image Margin, but I do not see anything happen if I change it.

Can one reduce the top margin for the Image on the button, or am I again missing the obvious?
Hi Peter,

I have made additions to the Button control to better handle Image positioning. There is now a new "ImageAlign" property.

Here is a download link where you can find a text WinFBE EXE (32 bit only) and the needed necessary new WinFormsX include files (that you would need to copy over your existing ones that are in the compiler's toolchain \inc folder).

Please let me know if I'm on the right path with this change. Hopefully it will make your project's image buttons a little easier to work with.

https://www.planetsquires.com/files/peter_button_image.zip
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

Here are two more fixes that will be in version 3.0.4.

- Form files would have their file encoding reset to ANSI on subsequent reloading of the project.

- New Projects created with a Visual Designer template would not have the new Form located in the Normal section of the Explorer treeview.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

QuoteWhen double-clicking an event in the toolbox, automatically enable that event, create the placeholder (if needed) and switch to that event in the code view.
Hi Paul,
EVENTS:
In a project with 7 forms, only 1 form will not allow Events to be checked for any controls. Checking any Toolbox Event will cause the creation of multiple Event Functions (as was happening previously). Double-clicking multiple times will create multiple Event Functions (the Code Editor doesn't open so unchecking the event creates another Event Function). And for just that form double-clicking will not switch to the code editor - all the remaining forms will switch to the code editor when double-clicking a Toolbox Event.
The subject form is a Tab control Child form. The other Tab control's Child forms do not exhibit this issue.
All the forms in this project were Transformed using the JSON Editor Online.
FORMS:
One of the forms in this project doesn't survive a WinFBE restart. I used the JSON Editor to Transform the form and it opens properly in WinFBE. Make changes, edit, etc. and compile and run - all good. Close WinBFE and restart WinFBE and the Form will no longer display in the Visual Designer and must again be Transformed.
No other projects display the behaviours described above.
Clive Richey