PureBasic Forum
http://forums.purebasic.com/english/

SweetyVD (Visual Designer)
http://forums.purebasic.com/english/viewtopic.php?f=12&t=68187
Page 5 of 11

Author:  JHPJHP [ Fri May 05, 2017 4:15 pm ]
Post subject:  Re: SweetyVD (Visual Designer)

Hi ChrisR,

I've been following your progress, really great work; with each new update SweetyVD keeps getting better.

A few small things:
1. Insert a TabBar Gadget, switch to Preview mode, click on the gadget
-- I am getting an error at line 2065
2. Change the BackColor of a Window, switch to Preview mode
-- BackColor is not changed
3. Unless there is a reason for it the following setting isn't needed: Compiler--Compiler Options--Use Compiler
-- I need to remove it before the code can be executed

Keep up the great work :!:

Author:  blueb [ Fri May 05, 2017 4:31 pm ]
Post subject:  Re: SweetyVD (Visual Designer)

Yes, I've noticed the same things JHPJHP.
(Win10Pro x86 and x64)

Author:  ChrisR [ Fri May 05, 2017 4:41 pm ]
Post subject:  Re: SweetyVD (Visual Designer)

Thanks JHPJHP,
I just reproduce for the tabBar gadget resized on preview.
I will correct it, not to write dimensions in the preview mode.
Edit: done

It was wanted for the window background color for the grid color in the designer.
But yes, I will try to get it in the preview mode, perhaps not just right now.

For the Compiler--Compiler Options--Use Compiler,
It is surely better. I will try to think about it to uncheck the option before uploading.
Thanks :)

Author:  ChrisR [ Fri May 05, 2017 5:07 pm ]
Post subject:  Re: SweetyVD (Visual Designer)

SweetyVD Update version 1.9.2
Gadget can be selected, moved wherever it is clicked now on Mac OS.
Repaint the gadgets after they have been moved or resized, on Left Click released, to avoid unwanted overlay.
Add an ini file for SweetyVD settings and customizations. The SweetyVD.ini file is created at first launch.
. To note that the drawing area size (OpenWindow) is defined in the Gadget templates. In SweetyVD.json file.

Current SweetyVD.ini
I'm not sure that the CustomAddition section are really useful
Code:
; The size of the drawing area (OpenWindow) is defined in the Gadget templates: SweetyVD.json file
;
[Designer]
SaveOnExit = 1
Designer_Width = 1000
Designer_Height = 660
Designer_Maximize = 0
ScrollArea_MaxWidth = 1920
ScrollArea_MaxHeight = 1020
Drag_Space = 10
Show_Grid = 1
Grid_Size = 20

[CodeCreate]
Include_TitleBlock = 1
Include_Enumeration = 1
Variable = 0
Include_StatusBar = 0
Include_EventLoop = 1
Include_CustomAddition = 0

[TitleBlock]
; Use FormatDate (%yyyy, %yy, %mm, %dd + Separator) to format the current date, variable: %Date%
; The Key name must start with "Line"
FormatDate = %yyyy-%mm-%dd
Line01 = ; -----------------------------------------------------------------------------
Line02 = ;           Name:
Line03 = ;    Description:
Line04 = ;         Author:
Line05 = ;           Date: %Date%
Line06 = ;        Version:
Line07 = ;     PB-Version:
Line08 = ;             OS:
Line09 = ;         Credit:
Line10 = ;          Forum:
Line11 = ;     Created by: SweetyVD
Line12 = ; -----------------------------------------------------------------------------

[CustomAddition]
; Include a dot "." as first character To include spaces at the beginning of a Line (eg: indentation)
; The Key name must start with "Line"

[CustomAddition_Include]
Line01 =

[CustomAddition_Constante]
Line01 =

[CustomAddition_Structure]
Line01 =

[CustomAddition_Variable]
Line01 =

[CustomAddition_Declare]
Line01 =

[CustomAddition_Procedure]
Line01 =

[CustomAddition_Init]
Line01 =

[CustomAddition_Main]
Line01 =

[CustomAddition_Exit]
Line01 =

Author:  ChrisR [ Fri May 05, 2017 6:37 pm ]
Post subject:  Re: SweetyVD (Visual Designer)

JHPJHP wrote:
2. Change the BackColor of a Window, switch to Preview mode
-- BackColor is not changed
Good to have :)
Done for the Preview mode and also with show grid disabled. It is updated on latest release on github v1.9.21

Author:  tester [ Fri May 05, 2017 8:11 pm ]
Post subject:  Re: SweetyVD (Visual Designer)

ChrisR wrote:
...@tester, thanks however it is is not really required here, for the Popup menu...

Thanks ChrisR, but with your correction
Code:
Case 1 To ArraySize(ModelGadget())   ;Popup menu for creating gadgets

not working adding ButtonGadget via popup menu.
Correct code:
Code:
Case 0 To ArraySize(ModelGadget())   ;Popup menu for creating gadgets

Author:  ChrisR [ Fri May 05, 2017 8:25 pm ]
Post subject:  Re: SweetyVD (Visual Designer)

Hi tester
Add Debug EventMenu() in line 1650 after Case 0 To...
and you will see that the 1st element "ButtonGadget" of the popup menu is 1, not 0.
Code:
          Case 0 To ArraySize(ModelGadget())   ;Popup menu for creating gadgets
            Debug EventMenu()

Author:  tester [ Fri May 05, 2017 8:39 pm ]
Post subject:  Re: SweetyVD (Visual Designer)

ChrisR wrote:
Hi tester
Add Debug EventMenu() in line 1650 after Case 0 To...
and you will see that the 1st element "ButtonGadget" of the popup menu is 1, not 0.
Code:
          Case 0 To ArraySize(ModelGadget())   ;Popup menu for creating gadgets
            Debug EventMenu()

Try running the compiled version and maybe you'll be surprised.
Add ButtonGadget not worked and TabBarGadget disappears from the Popup menu.

Update: Sorry my mistake - the old SweetyVD.json was to blame. :(

Author:  ChrisR [ Sat May 06, 2017 1:49 pm ]
Post subject:  Re: SweetyVD (Visual Designer)

No worries, Indeed SweetyVD.json has changed a bit.
It is probably better to delete it and also SweetyVD.ini, before an update. Or save it, in case of personalization.

There is a small fix and update, v1.9.22, to be able to run on Mac OS. Thanks Mindphazer :)

Author:  blueb [ Sun May 07, 2017 1:52 pm ]
Post subject:  Re: SweetyVD (Visual Designer)

Hi Chris,

Some projects require the Form to be an odd size, and I sometimes need more than one.
example: 640 x 480 or 1024 x 768

For me, it would be preferable to start SweetyVD with the 'last used' form size, like SweetyVD itself.

blueb

Author:  blueb [ Sun May 07, 2017 3:19 pm ]
Post subject:  Re: SweetyVD (Visual Designer)

Small wish about colors..

I created a form with a nice 'Minty' color for a Background, a ContainerGadget, and a couple of buttons and placed it in the PB Editor.

When I went to modify the ContainerGadget's background color (I wanted to pick a color using PureBasic's Color Picker Tool),
I found this...
SetWindowColor(#Window_0, 15269864)

I realize that SetWindowColor(#Window_0, 15269864) is: Hex(15269864); $E8FFE8

PureBasic's Color Picker Tool gives use a choice of either..
#1 - Insert Hex number ($E8FFE8)
#2 - Insert RGB (RGB(232, 255, 232))

Could we have SweetyVD place #1 or #2 in the color parameter of all inserted code?

Most "new users" would likely be familar with RGB(232, 255, 232) rather than $E8FFE8, but that's only an opinion.

Author:  ChrisR [ Sun May 07, 2017 4:56 pm ]
Post subject:  Re: SweetyVD (Visual Designer)

Hi Blueb,
I also asked myself about the 'last used' form size.
I did not do it in a first time because the dimensions are also defined in the Gadgets models. SweetyVD.json > OpenWindow
With your request in addition, I agree, I will add it, like SweetyVD itself.

Author:  ChrisR [ Sun May 07, 2017 5:41 pm ]
Post subject:  Re: SweetyVD (Visual Designer)

About Color, for now it is done simply with ButtonImageGadget and ColorRequester()
To choose the color and draw that color on the 2 buttons for the front and back colors.
Do it like this, allows me to gain some space for the properties and to stay in the simplest way.

In future, I will probably need other properties like values for AddGadgetItem(s), X/Y Scroll position for ScrollareaGadget, Add Tab with active tab for PanelGadget.
If it's possible, I beleive it is better if all the properties can be seen without the need of section (+/-).
Thanks for the proposal, I keep the idea but I'm not sure right now. To see

Author:  ChrisR [ Sun May 07, 2017 6:45 pm ]
Post subject:  Re: SweetyVD (Visual Designer)

blueb wrote:
For me, it would be preferable to start SweetyVD with the 'last used' form size, like SweetyVD itself.

Done, UserScreen_Width and Height are save now in SweetyVD.ini. v1.9.23

Author:  ChrisR [ Mon May 08, 2017 11:26 pm ]
Post subject:  Re: SweetyVD (Visual Designer)

blueb wrote:
Small wish about colors..
Could we have SweetyVD place #1 or #2 in the color parameter of all inserted code?

Sorry for my misunderstanding blueb :oops:
I added now the color value in RGB or hexadecimal format in the generated code.
With a new setting in SweetyVD.ini: Hexa_Color = 0/1, default value = 0 > RGB
To get this new parameter in the ini file, you must remove the old SweetyVD.ini if it exists.
Updated version 1.9.24

Page 5 of 11 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/