SweetyVD (Visual Designer)

Share your advanced PureBasic knowledge/code with the community.
User avatar
Michael Vogel
Addict
Addict
Posts: 2666
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: SweetyVD (Visual Designer)

Post by Michael Vogel »

Really cool - maybe it will find it's way into PB6 :wink:

What I didn't see so far - saving/loading a design. This could be easily done by something like...

Code: Select all

		Procedure SaveDesign(file.s="Test.svd")

			If CreateFile(0,file)

				ResetMap(SVDListGadget())
				With SVDListGadget()
					While NextMapElement(SVDListGadget())
						WriteInteger(0,\Gadget)
						WriteInteger(0,\Type)
						WriteInteger(0,\DragHandle)
						WriteInteger(0,\X)
						WriteInteger(0,\Y)
						WriteString(0,\Model)
						WriteString(0,\Name)
						:
					Wend
					CloseFile(0)
				EndWith
			EndIf

		EndProcedure

...if everything of the design is saved in SVDListGadget structure. Is this correct or is more information needed to restore a saved form?
User avatar
Zebuddi123
Enthusiast
Enthusiast
Posts: 794
Joined: Wed Feb 01, 2012 3:30 pm
Location: Nottinghamshire UK
Contact:

Re: SweetyVD (Visual Designer)

Post by Zebuddi123 »

Hi Michael Vogel yes there is more ! I have programmed all the extraction for all required fields and reloading and reinitializing the the gui with the loaded saved form. As I`m doing this when time permits it`s taking longer than I had hoped. Plus having to follow and understand someone else`s code. Hopefully I`ll get back to it this weekend.

Chris R have done a great job. I for one think it should be included in PB6+ lol (sorry polo no offence ment) but then again I`m sure some of the better coders could do it quicker and better. :)

Export and imports as xml

Zebuddi.
Image
malleo, caput, bang. Ego, comprehendunt in tempore
loulou2522
Enthusiast
Enthusiast
Posts: 495
Joined: Tue Oct 14, 2014 12:09 pm

Re: SweetyVD (Visual Designer)

Post by loulou2522 »

Hi Zebuddi123,
I am very impatient to see the result when did you post the new code ?
Thanks in advance
User avatar
Zebuddi123
Enthusiast
Enthusiast
Posts: 794
Joined: Wed Feb 01, 2012 3:30 pm
Location: Nottinghamshire UK
Contact:

Re: SweetyVD (Visual Designer)

Post by Zebuddi123 »

Hi loulou2522 and All. Had some time today and just finished. Save and Load is up and running although not extensively tested. I`ll post the code as a zip with link shortly, please test but remember I am still figuring out as I go along how ChrisR`s code is set up!

As I thought ChrisR code would been nice clean and easy to follow :) although it does get a bit complicated for me after line 14. But I have persevered :lol:

I hope it runs without to much of a hiccup. Famous last words :)

Zebuddi.
malleo, caput, bang. Ego, comprehendunt in tempore
User avatar
Zebuddi123
Enthusiast
Enthusiast
Posts: 794
Joined: Wed Feb 01, 2012 3:30 pm
Location: Nottinghamshire UK
Contact:

Re: SweetyVD (Visual Designer)

Post by Zebuddi123 »

Hi to All Here`s The Link :) Updated link forgot to free a map on load complete. :oops:

Zebuddi.

https://goo.gl/sp1hDo
malleo, caput, bang. Ego, comprehendunt in tempore
User avatar
blueb
Addict
Addict
Posts: 1041
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Re: SweetyVD (Visual Designer)

Post by blueb »

Is it just me, or did you lose all the color information? :?

e.g. - backcolor of Main Form
- Front/back color on Container, etc.
- It was too lonely at the top.

System : PB 6.10 Beta 9 (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
User avatar
Zebuddi123
Enthusiast
Enthusiast
Posts: 794
Joined: Wed Feb 01, 2012 3:30 pm
Location: Nottinghamshire UK
Contact:

Re: SweetyVD (Visual Designer)

Post by Zebuddi123 »

Hi blueb just working on userdata now. Main goal for yesterday was to get the gadget to load in correct positions and redraw, Having to scan through the code as some of the userdata ie windows width/height are not save in the original map. So Hopefully next couple of days as time permits I will have that sorted.

Zebuddi. :)
malleo, caput, bang. Ego, comprehendunt in tempore
Klonk
Enthusiast
Enthusiast
Posts: 173
Joined: Tue Jul 13, 2004 2:17 pm

Re: SweetyVD (Visual Designer)

Post by Klonk »

Looks very nice. Good work...
Bye Karl
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: SweetyVD (Visual Designer)

Post by BarryG »

Downloaded SweetyVD just now to test it, but it doesn't run on my PC.

I hope it's not looking in the Registry for the Compiler home path, because I run PureBasic portably.

Image
User avatar
blueb
Addict
Addict
Posts: 1041
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Re: SweetyVD (Visual Designer)

Post by blueb »

Look in your PureBasic Themes folder (e.g. F:\PureBasic\Themes) for
the SilkTheme.zip. Copy it over to the same folder as SweetyVD.

SweetyVD will unzip it as needed. :)
- It was too lonely at the top.

System : PB 6.10 Beta 9 (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: SweetyVD (Visual Designer)

Post by BarryG »

Thanks blueb, that worked.
User avatar
Caronte3D
Addict
Addict
Posts: 1027
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: SweetyVD (Visual Designer)

Post by Caronte3D »

Hi i'm new here and purebasic too :wink:

I don't know how to install this tool correctly (i think)

I call it from the Tools menu, and I already can make interfaces with it, but... How can reload these in case SweetDV was closed? :shock: Or it's not possible to continue working on a interface done yesterday by example? (I hope)

Thank you by share it.
User avatar
Caronte3D
Addict
Addict
Posts: 1027
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: SweetyVD (Visual Designer)

Post by Caronte3D »

Mmmm... Ok, I think is not possible to reload forms at all :?
The only alternative is the integrated designer?
Bitblazer
Enthusiast
Enthusiast
Posts: 732
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: SweetyVD (Visual Designer)

Post by Bitblazer »

Caronte3D wrote:The only alternative is the integrated designer?
There are several other options but i prefer PureVision
webpage - discord chat links -> purebasic GPT4All
User avatar
Caronte3D
Addict
Addict
Posts: 1027
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: SweetyVD (Visual Designer)

Post by Caronte3D »

Thanks for your answer, but I see PureVision very old style (80s?) :?
I doesn't understand why the coder of SweetyVD forgot to include a load or import function.

I Just discovered DialogDesigner for XML dialogs, It's not the same thing but is better than nothing :wink:
Post Reply