Update

Started by Paul Squires, March 21, 2018, 10:31:04 AM

Previous topic - Next topic

Paul Squires

If the exe that I posted is okay then I will start adding the other controls and menu and toolbar editors. The core of the designer and generator is looking pretty good at this point.
Paul Squires
PlanetSquires Software

Johan Klassen

Hi Paul :)
it appears OK, however try the following, on a button set the text to a character from the Symbol font, the character displays OK on the designer form but not when compiled.

Paul Squires

Quote from: Johan Klassen on July 18, 2018, 08:16:10 PM
Hi Paul :)
it appears OK, however try the following, on a button set the text to a character from the Symbol font, the character displays OK on the designer form but not when compiled.

It seems to be working okay for me with my limited tests. Maybe you can send me a project showing the problem?
Paul Squires
PlanetSquires Software

raymw

For me, the button text changes seem to be OK, but colors, although in the code, do not change in display.

Paul Squires

For colors you need to set the ThemeSupport property to False.
Paul Squires
PlanetSquires Software

Johan Klassen

maybe Windows is messed up, I will try it on another VM tomorrow and let you know.

Johan Klassen

#51
tried on another VM with same result, if I create a new project and place a button on the form and change the font from Segoe UI to Symbol and replace the Text of the button with down-arrow it show on the designer form but not when compiled, also the Font properties shows Symbol in Greek letters.
actually it shows the character but with 3 additional characters before.

Paul Squires

I see Symbol in Greek letters as well. How did you "...replace the Text of the button with down-arrow"
Paul Squires
PlanetSquires Software

Johan Klassen

#53
I used Character Map
in retrospect I should not have mentioned this issue, I apologize for diverting you attention from more important matters.

Paul Squires

#54
Quote from: Johan Klassen on July 18, 2018, 10:57:35 PM
I used Character Map
in retrospect I should not have mentioned this issue, I apologize for diverting you attention from more important matters.

:) This is an important issue. A person should be able to see in the designer and the resulting code, the exact same results.
I can see the problem exactly as you have described it. Now I need to find out why it works okay in the visual designer but not in the resulting compiled exe.
Paul Squires
PlanetSquires Software

raymw

Hi Paul,
setting themesupport to false does the trick, but wrt your statement re. designer and code showing the exact same results, that is not quite true in this case, the constructor code shows colors (and does not show theme support). Also textmargin is not defined. I guess somewhere there is a list of what is and what is not yet implemented.

Paul Squires

Quote from: raymw on July 19, 2018, 08:30:03 AM
Hi Paul,
setting themesupport to false does the trick, but wrt your statement re. designer and code showing the exact same results, that is not quite true in this case, the constructor code shows colors (and does not show theme support). Also textmargin is not defined. I guess somewhere there is a list of what is and what is not yet implemented.

Hi Ray - the constructor will output all properties where the property value differs from the default value. Because you set the colors, the values differ from the defaults so they get outputted. The default value for ThemeSupport is True so that does not get output to the constructor until it is set to False. You can see in the property descriptions in the Property List for each of the color properties that you need to set ThemeSupport to False in order for the colors to take effect. TextMargin does not do anything because I think that margin relates to the distance between the text and any image assigned to the button - images are not yet implemented.
Paul Squires
PlanetSquires Software

raymw

Thanks for the explanation, but I think although it is logical, it is misleading, at least initially, and expect it may be worse later on. Sticking with pushing buttons, should there be a backcolordown for the button, as there is for the button text? (could easily end up with fifteen pages of parameters for a button, if not careful). I can't think of the situation where the text background color needs to be different to the button color for plain colored buttons, but I expect if the option wasn't there I'd think of one.

Having used firefly, will you be implementing the double click on an item in the visual designer generating a code stub?

raymw

Changing the button text, say, in the code is not reflected in the visual designer until you compile, (and then it seems not always) but changing the name in the toolbox immediately changes the text in the button gui, but not in the code, until compiled. It seems a change is needed in the button name in the toolbox, to over-ride the name shown in the code, and when the program is run.

Paul Squires

The visual designer is not two way like PB's PBForms. The code is generated based on what settings and text you enter into the Property List.

Per the help file:

Quote
Code is generated between to comment labels. You should NEVER modify any code between these labels because WinFBE will regenerate code between the labels so whatever you add, change or modify will eventually be lost.
' WINFBE_CODEGEN_START
' WINFBE_CODEGEN_END


When you change the text in the Property List, the code will get updated when you switch from Design view to Code view. That is, the code between the two tags mentioned above will get regenerated. If you modify anything in the Constructor then that will simply get overwritten again when you switch back and forth between design and code view - anything you change in code does not get reflected back to the design form.  If you must change text via code, then the best place to do that would be in the Form's Load event.
Paul Squires
PlanetSquires Software