Version 1.8.1 (October 7, 2018)
- Fixed: Regression causing build combobox to immediately close when clicked.
- Changed: Updated the Spanish language file (thanks Jose Roca).
https://github.com/PaulSquires/WinFBE/releases
Hi Paul,
CheckBox
On a "test" form is an UnChecked CheckBox. Compile and run. The CheckBox is correctly Unchecked. Left Click once and the CheckBox is Checked. This single click produces 2 events in the control's Click Event: sender.CheckState = 2 (Unchecked), immediately thereafter sender.CheckState = 1 (Checked). From this point (after the first click) forward, a single left click produces just 1 event: Checked or Unchecked.
However, change focus to a different program and then return to the test form, once again the same initial 2 events is the result of the next CheckBox click then returning to a single event for subsequent clicks.
Function frmMain_chkHere_Click( ByRef sender As wfxCheckBox, ByRef e As EventArgs ) As LRESULT
if sender.CheckState = 1 then
? "1", time
Elseif sender.CheckState = 2 then
? "2", Time
Else
? "State Indeterminate"
end if
Function = 0
End Function
Silly question: is this behaviour correct?
That is interesting. I am seeing the same behaviour that you are describing. I will trace the Windows messages to see why the click is firing twice. I'll post back once I figure it out.
Okay, found it. Looks like for the CheckBox I forgot to explicitly test for the BN_CLICKED notification:
Before:
If pCheckBox AndAlso AndAlso pCheckBox->OnClick Then pCheckBox->OnClick(*pCheckBox, e)
After:
If pCheckBox AndAlso lNotification = BN_CLICKED AndAlso pCheckBox->OnClick Then pCheckBox->OnClick(*pCheckBox, e)
I'll post an update soon.
Also, you should get into the habit of testing against the named enum rather than a "1" or "2" value.
if sender.CheckState = CheckBoxState.Checked then
? "Checked", time
Elseif sender.CheckState = CheckBoxState.UnChecked then
? "UnChecked", Time
Else
? "State Indeterminate"
end if
For sure and thanks, forgot they were there! I need to make myself an ENUM Popup.
BTW, the fold "+" only appears before a Function() when the line immediately following Function contains code, not comments (in Col 1) or blank (same with a Sub()). The fold will still work but the line under a folded Function is missing. With code as the first line the "+" is present and so is the solid line between Function and End Function. Column 1 cannot contain "'" or Space.
The folding in firefly worked fine. Here, it seems to have a mind of its own. I get fold points in mysterious places, and 'fold all' does not fold all. I guess it's looking for lines to be formatted in a particular way, but I've no idea what that way is. Copying text created in firefly which folded correctly, and looked OK, gets fold points in odd places in winfbe. It does not seem possible to manually edit fold points. I hope I've attached a screen shot. OK my code is messy, but is it all having to go pythonesque these days?
Hi Ray,
Fold All does not work on my W10 machine so I tried to fold all manually/individually then unfolded all with View>UnFold All and that worked, which must have set something because Fold All and UnFold All now works. However, this only lasts for the current session. Restart WinFBE and the folding issue is back requiring manual folding.
Also, I found that either a single space or code as the first line of a Sub or Function or Scope appears to help folding work correctly - it also adds the separator line between Sub/End Sub et cetera.
Update:
Repeated toggling between ALT/F8 and SHFT/F8 will eventually get all of the folds correct. There are still folds in strange places...
FYI, Labels are folded separately from Subs and Functions.
I had complete control over folding in FireFly because I wrote the editing DLL myself 100% in PowerBasic. I use the Scintilla DLL for editing in WinFBE. The folding is built into that DLL based on Visual Basic logic. Scintilla is written on C++ and I would need to modify that source and recompile. I don't use folding so my interest in that area is certainly not robust.
I seldom use folding so it's not at the top of my wishlist.
Hi Paul,
Just noticed this while experimenting with the colour picker on a test form. It's the same for all controls regardless of the custom colour chosen.
I can't duplicate in older versions of WinFBE64 or any recent versions of WinFBE32.
Thanks Clive! I have found the source of the problem and have fixed it. It will be in the next upload.
Look forward to it!
No problem at all. I will have Jose's new MaskedEdit control in the next upload also, as well as a new help type of system to show the markdown documentation that Jose uses (and I will use to document to WinFBE and the visual designer).
Hi Paul, looking forward to the new help system.