PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 ... 6

Author Topic: Update  (Read 3717 times)

Paul Squires

  • Administrator
  • Master Member
  • *****
  • Posts: 8553
  • Windows 10
    • PlanetSquires Software
Re: Update
« Reply #15 on: June 10, 2018, 07:34:41 PM »

This weekend I *finally* tackled code that I had been procrastinating on for many weeks.... the PropertyList. The PropertyList needs to display several internal tools in order to get the property choice from the user. For example, a textbox to get text data, a combobox to get True/False choices or other lists, a Color picker, Font picker, Picture picker.... etc.  I have all of the internal code finished that creates, assigns, and processes properties for forms and controls. I have the edit control and combobox pickers done. Next will be the color picker. Once the PropertyList is finally finished I plan to write the Menu Editor. That one should be easier.

Screenshot of the PropertyList is attached.

Hang in there guys... visual designer will be done as soon as I can.


Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Paul Squires

  • Administrator
  • Master Member
  • *****
  • Posts: 8553
  • Windows 10
    • PlanetSquires Software
Re: Update
« Reply #16 on: June 15, 2018, 08:34:54 PM »

....man, I'd forgotten how much work building a visual designer actually is!  :D
Still working on the PropertyList.
It's looking good.
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Paul Squires

  • Administrator
  • Master Member
  • *****
  • Posts: 8553
  • Windows 10
    • PlanetSquires Software
Re: Update
« Reply #17 on: June 20, 2018, 10:05:23 PM »

A couple of screenshots of the greatly enhanced ToolBox. The PropertyList is fully functional (except for Image/Icon selection).
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Paul Squires

  • Administrator
  • Master Member
  • *****
  • Posts: 8553
  • Windows 10
    • PlanetSquires Software
Re: Update
« Reply #18 on: July 03, 2018, 10:13:16 PM »

Happy to present a couple more screenshots. This one shows the Label control displaying custom foreground and background colors; a standard system styled button control; and a non-themed styled button with custom colors and different font. The second screenshot shows the code generated that produces this form and controls. WinFBE only generates code for those properties where the property value is different than the default values (in order to prevent too much code bloat in the output).
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Josť Roca

  • FireFly3 Registered User
  • Master Member
  • *
  • Posts: 3087
    • Jos
Re: Update
« Reply #19 on: July 03, 2018, 10:49:06 PM »

This syntax will make VB guys very happy.

For coloured buttons and ownerdraw labels, I have a crazy idea to make them yet more colourful: to optionally use gradients. You will need entry fields for two TRIVERTEX structures with fields for Red, Green, Blue and Alpha and, when drawing the background color, instead of FillRect to call GrandietFill.

You will also need a field for the type of gradient: vertical or horizontal.
« Last Edit: July 03, 2018, 11:05:50 PM by Josť Roca »
Logged

Paul Squires

  • Administrator
  • Master Member
  • *****
  • Posts: 8553
  • Windows 10
    • PlanetSquires Software
Re: Update
« Reply #20 on: July 04, 2018, 07:46:14 AM »

Hi Jose, I am modelling the code structure off of .net from Visual Studio 2017. I am looking at the C# syntax but this does also look very VB-like. Not sure about the gradients - that style seems very 5 years ago. I don't see many applications these days that make use of gradient themed buttons controls anymore.
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

raymw

  • FireFly3 User
  • Junior Member
  • *
  • Posts: 192
Re: Update
« Reply #21 on: July 04, 2018, 10:06:09 AM »

Not sure if any help, but can't you use an image for all button colouring, gradients, tartans, tessellations and other patterns? Not sure how it works, never used button images, and I guess it would need more memory, but an image for normal, another for pressed for every button (and then you could create a nice graphics program to generate said images...).
Logged

Josť Roca

  • FireFly3 Registered User
  • Master Member
  • *
  • Posts: 3087
    • Jos
Re: Update
« Reply #22 on: July 04, 2018, 10:23:57 AM »

Hi Jose, I am modelling the code structure off of .net from Visual Studio 2017. I am looking at the C# syntax but this does also look very VB-like. Not sure about the gradients - that style seems very 5 years ago. I don't see many applications these days that make use of gradient themed buttons controls anymore.

I personally don't like them. Maybe in a label, but for buttons I use a icon at most. Some think that an abundance of colors makes a gui more appealing, but I find them tacky.

Paul Squires

  • Administrator
  • Master Member
  • *****
  • Posts: 8553
  • Windows 10
    • PlanetSquires Software
Re: Update
« Reply #23 on: July 04, 2018, 11:57:39 AM »

Tacky. Exactly.
Windows seems to be moving towards a more clean, uncluttered, flat style.
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Paul Squires

  • Administrator
  • Master Member
  • *****
  • Posts: 8553
  • Windows 10
    • PlanetSquires Software
Re: Update
« Reply #24 on: July 08, 2018, 06:55:59 PM »

My plan is to upload a test version of the editor package by Thursday, July 12 so you guys can see the direction that the visual designer is headed in and provide some feedback. I will include a small sample program showing the available buttons and some code that responds to events, etc. So far the controls available are Button, CheckBox, ListBox, Label and TextBox.
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Johan Klassen

  • FireFly3 Registered User
  • Junior Member
  • *
  • Posts: 70
  • FF3 User
Re: Update
« Reply #25 on: July 08, 2018, 08:20:56 PM »

hello Paul Squires
will the visual designer work like VB?
my guess is probably not, but unless you are proficient in Windows SDK programming or are willing to spend 2 years in learning, it will not help people like me.
recently I had promised a friend to write a small GUI app and I wrote in VB6, had only briefly been exposed to VB about 20 years ago, it took me 2 weeks to learn and make the app, and that was spending maybe one hour a day (about 12 hours total)
I had a crazy thought, what if there was a cheat-sheet giving in two or four lines of code the different actions for basic controls, for example
how to get the text from a TextBox
how to set the text in a TextBox
how to select all the text in a TextBox when in focus, that is, the text is automatically selected when visited via Tab key
how to intercept the Shift and or Return keys
how to send a key to TextBox, for example, send Tab key when the return or enter key is pressed, also send shift-tab when shift-return or shift-enter is pressed.
« Last Edit: July 08, 2018, 08:42:23 PM by Johan Klassen »
Logged

Paul Squires

  • Administrator
  • Master Member
  • *****
  • Posts: 8553
  • Windows 10
    • PlanetSquires Software
Re: Update
« Reply #26 on: July 08, 2018, 09:51:04 PM »

Hi Johan, that is EXACTLY the type of help reference that I will write for this project. Basically a series of How to Do Things with each control rather than an endless list of properties, methods and events. The visual designer is working like VB - actually, like a hybrid of VB and Visual Studio C# and .Net. The idea is to abstract away as much of the Windows SDK programming as possible because the last 10 years has shown me that most users tend not to take the time to learn the nuts and bolts of WinAPI programming but rather higher level wrappers. At this point, not many of those methods/wrappers are written yet because I am concentrating on getting the actual controls basics to work first. Wrappers/methods are the easy part to write. For example, below I wrote the SelectNextControl method in about a minute and added it to the base control class.

Here is how it would work for your TextBox example (assume the TextBox is called txtAddress and is located on a form called frmMain):
(CWSTR is a dynamic unicode string class type from Jose's WinFBX library). The new visual designer is 100% unicode only.

- how to get the text from a TextBox
Dim As CWSTR wszAddress = frmMain.txtAddress.Text

- how to set the text in a TextBox
frmMain.txtAddress.Text = "This is my new address"

- how to select all the text in a TextBox when in focus, that is, the text is automatically selected when visited via Tab key
This is how the visual designer already works in the resulting produced compiled exe. As the textbox gains focus the text is highlighted. Likewise, when the code below is executed to simulate TAB, SHIFT+TAB, it also highlights the textbox text (if the textbox.MultiLine property is False).

- how to intercept the Shift and or Return keys
- how to send a key to TextBox, for example, send Tab key when the return or enter key is pressed, also send shift-tab when shift-return or shift-enter is pressed.
The following code works perfectly in the current code of the visual designer. I am still deciding how to handle trapping keyboard input. The code below cataches it in KeyUp but you can also catch it in KeyDown or KeyPress (which is WM_CHAR). I am thinking of routing all keys ultimately through KeyPress (ascii and virtual) so you have one method where you can reliably know you'll find all keypresses (I will see how .Net handles this kind of thing).

Code: [Select]
''
''
Function frmMain_txtAddress_KeyUp( ByRef sender As wfxTextBox, ByRef e As EventArgs) As LRESULT
   
   ' Catch the RETURN key to simulate TAB and Shift-TAB
   ' If you were wanting to test multiple textboxes controls (eg. a series of textboxes) then
   ' I would the following code in a dedicated function rather than duplicating it each time.
   if e.KeyCode = VK_RETURN then
      if e.Shift then
         sender.SelectNextControl(false)
      else
         sender.SelectNextControl(true)
      end if
      e.Handled = true   
   END IF
   
   Function = 0
End Function
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Paul Squires

  • Administrator
  • Master Member
  • *****
  • Posts: 8553
  • Windows 10
    • PlanetSquires Software
Re: Update
« Reply #27 on: July 08, 2018, 10:04:35 PM »

Looks like I am already handling keyboard input very similarly to the way that .Net handles it:

Key events occur in the following order:
    KeyDown
    KeyPress
    KeyUp

The KeyPress event is not raised by non-character keys other than space and backspace; however, the non-character keys do raise the KeyDown and KeyUp events.

Therefore to catch the ENTER key, need to use KeyDown or KeyUp. I chose to do it in KeyUp.
This is very similar to how the WinAPI handles keyboard input through messages like WM_KEYDOWN, WM_KEYUP, and WM_CHAR.
« Last Edit: July 08, 2018, 10:06:35 PM by Paul Squires »
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

Johan Klassen

  • FireFly3 Registered User
  • Junior Member
  • *
  • Posts: 70
  • FF3 User
Re: Update
« Reply #28 on: July 08, 2018, 10:05:40 PM »

wow, I am excited :)
this is exactly what I was hoping for.
Logged

Paul Squires

  • Administrator
  • Master Member
  • *****
  • Posts: 8553
  • Windows 10
    • PlanetSquires Software
Re: Update
« Reply #29 on: July 08, 2018, 10:07:49 PM »

Thanks Johan, still a long way to go but the future looks promising.
:)
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor
Pages: 1 [2] 3 4 ... 6