MaxGUI property editor

BlitzMax Forums/MaxGUI Module/MaxGUI property editor

JoshK(Posted 2009) [#1]
Try it out:
http://www.leadwerks.com/post/grid.zip




GaryV(Posted 2009) [#2]
Works well and looks good.


Wiebo(Posted 2009) [#3]
Works just fine here (vista ultimate).
You say this is done in MAXgui? Very nice. How did you create the property editor?


Mark Tiffany(Posted 2009) [#4]
Very nice! Is it all maxgui and therefore cross-platform? If so, it would be extremely nice if you were prepared to donate this to SebHoll's maxgui proxygadgets collection...although not sure I personally have a use for it just now!


JoshK(Posted 2009) [#5]
I'll release this when it is ready. It still needs some work, and I would like to replace the special gadgets with proxy gadgets, which requires a fix for a bug/design flaw I reported.

It works well with WindowsXP and Vista, with MaxGUIWin32Ex. I have no idea what it looks like on Mac and Linux.


Mark Tiffany(Posted 2009) [#6]
Happy to try out on my Ubuntu VM if you want to email me.


plash(Posted 2009) [#7]
It works fine under WINE in Ubuntu 9.04 (needless to say, that isn't much of a test).


degac(Posted 2009) [#8]
Great work!


SebHoll(Posted 2009) [#9]
Looking very nice, Leadwerks... Amazing!!!

Can I ask, how are you doing the dotted line/treeview effect thing?


JoshK(Posted 2009) [#10]
It's just a panel with a repeating pixmap.


jsp(Posted 2009) [#11]
Looks quite good, i like the design.
Well done!


Zeke(Posted 2009) [#12]
very good. i hope that this is added to proxygadgets soon..


Htbaa(Posted 2009) [#13]
Works very well. Impressive job!


JoshK(Posted 2009) [#14]
It's almost ready.

I found that for editing multiple object types, I needed to be able to combine two property editors to show only their common properties:
http://www.leadwerks.com/post/gridcombo.zip


JoshK(Posted 2009) [#15]
Okay, try it out (source code included):
http://www.leadwerks.com/post/PropertyGrid.zip

The code is also here:
http://blitzmax.com/codearcs/codearcs.php?code=2490

Messy, but it does everything I wanted.


GaryV(Posted 2009) [#16]
very, very useful. Thank you.


JoshK(Posted 2009) [#17]
It generates events only when a value changes. You can also set any property's value (just use property.SetValue() to use a string) or you can get a value from the whole editor with propertygrid.GetKey("name","defaultvalue")).

You can hide items of a property grid by using the Combine() method, which will combine it with another property grid, and hide any properties they don't share. Use the SHowAll() method to restore the hidden items.

I am curious to see what it looks like with MacOS and Linux.


d-bug(Posted 2009) [#18]
First of all, great job so far. It's working well on OSX, but there are some layout-issues




Dropdown:
The dropdowns on OSX must have a min. height of 22 to look adorable.
Initialising TPropertyGroup.itemheight to 22 looks well on all other Items too.

Colorbutton:
You can't use SetGadgetColor for buttons on OSX. Create a square panel instead would fix this.

Vertical Sliders at PROPERTY_FLOAT
I think it would be better to use two panels instead of the slider. They don't work on OSX and the slider is to small to show it's buttons.


Group-Header:
OSX seems to have an other order of drawing the gadgets. I guess it would be better to restrict the header width.

Icons:
useing png instead of tga solved that issue,


JoshK(Posted 2009) [#19]
When you are done with your MacOS modifications, post it and I will update the source. I don't care about MacOS enough to do anything myself, but I will add your additions if you like. Just use ?MacOS so my Windows behavior isn't changed.


Mark Tiffany(Posted 2009) [#20]
Was going to try on linux, but the zip link seems to be unhappy...and code archives obviously doesn't have the images...


d-bug(Posted 2009) [#21]
Okay, I've done those view issues for you. Please let me know if anything went wrong on the Windows version.



Download from here!


Mark Tiffany(Posted 2009) [#22]
To my eyes, the combobox looks a little too small still in that shot. Will try out your archive on linux in a mo...


SebHoll(Posted 2009) [#23]
Iirc, ComboBoxes should be 24 pixels high.


byo(Posted 2009) [#24]
Yes!!! Make it a proxygadget!!! :D


d-bug(Posted 2009) [#25]
Iirc, ComboBoxes should be 24 pixels high.

Okay, then I have to do a complete rewrite of the itemsize setting. If I change the itemssize to 24 the buttons will change their style from square to rounded, wich looks pretty ugly in this case.

Seb, is there any chance to get style flags on buttons instead of size dependend styles?


JoshK(Posted 2009) [#26]
I've got my application settings working with reflections. I just declare a new field, and the program creates the interface automatically, and controls the field with the property editor. Pretty amazing stuff.


Mark Tiffany(Posted 2009) [#27]
I think the itemsize stuff needs a bit of tidying up - I tried this on Linux yesterday and neither compiling with the non-Macos or Macos variants seemed to work consistently on Linux too.

d-bug / leadwerks, any chance of a few comment being added to the source to document all those size fields? I tried fiddling with some, but couldn't work it out. so any pointers at all would help.

In terms of Linux though, 2 things do need changing:
- fltk seems to have different behaviour for panels with pixmaps - on win32 & macos the tree "dots" repeat, but not on Linux FLTK unless you specify PANELPIXMAP_TILE. Should be completely safe to add this to create lines for all pixmaps that have a repeating pixmap
- fltk isn't liking the win32 images - it prefers the osx ones.

d-bug, if you're making further changes, maybe you could tweak for the above points too? I'll hold off doing these and looking further on linux until you're done...


d-bug(Posted 2009) [#28]
I've hadn't any plans to make further changes. I've tested a bit on the combobox size and ended up with a completly broken layout. It all comes down to that button-style size dependence. After all its still Leadwerks code and I don't want to change to much in it.

cheers


Mark Tiffany(Posted 2009) [#29]
I've hadn't any plans to make further changes. I've tested a bit on the combobox size and ended up with a completly broken layout. It all comes down to that button-style size dependence. After all its still Leadwerks code and I don't want to change to much in it.

Okey-doke - will try again, but it sounds like we're both trying to figure out all those size constants without much luck.


JoshK(Posted 2009) [#30]
Changing itemheight should change the whole layout, but I haven't tried it. You will need to edit that tree image to match the new item height.


Mark Tiffany(Posted 2009) [#31]
ta - will take another look over the next couple of days...


d-bug(Posted 2009) [#32]
Itemheight does change the whole layout correctly but exactly this is the problem with the buttons on OSX. The tree image for OSX is changed to fit the 22 pixel height itemsize. The image height has to be 2 pixel larger then the itemheight.


JoshK(Posted 2009) [#33]
The item spacing constant is 2, so yeah the image has to be itemheight+itemspacing tall.


SB(Posted 2010) [#34]
I found a small bug in the TProperty SetValue($s) Method that prevented comboboxes from getting updated after propertyGrid.SetProperty()

it should be
Case PROPERTY_CHOICE
	SetValueChoice(Int(s))

instead of
Case PROPERTY_CHOICE
	SetValueString(Int(s))



Qcat(Posted 2010) [#35]
Hi All!

Has any one still got the source zip for this has i have lost my copy. i am looking for property editor for a project i am working on.

Thanks


GaryV(Posted 2010) [#36]
Qcat, I asked this a while back in another thread and I still haven't got an answer. This was a good little gem.

edited for typo

Last edited 2010


Ked(Posted 2010) [#37]
It's in the code archives, isn't it?


GaryV(Posted 2010) [#38]
No, the link in the code archives is the same link as the link in this thread. The link is dead. AFAIK, there is not a working link for the required graphics.


Zeke(Posted 2010) [#39]
PropertyGrid source


Qcat(Posted 2010) [#40]
Thanks that is fantastic!!


GaryV(Posted 2010) [#41]
Thank you, Zeke!


GaryV(Posted 2011) [#42]
I hate to ask this, again, but does anybody have this?


Wiebo(Posted 2011) [#43]
I do not have it, sorry. If you are not able to get it, you might try the property grid module I made some time ago: http://code.google.com/p/noisycode/

Last edited 2011


jsp(Posted 2011) [#44]
Found it on my disk and have it uploaded here:
>>Click<<


GaryV(Posted 2011) [#45]
Thank you, jsp. You are a life saver.

Wiebo: I will check it out over the weekend.


NoOdle(Posted 2012) [#46]
slight graphical glitch I noticed on windows, the text labels wrap to the line below which are then overdrawn by the next entry below in the property grid.


matibee(Posted 2012) [#47]
I appreciate this is 2 years old and in the code archives, but I thought I'd post here any since it's more recent..

I've just tried using this for editing objects in a scene but it doesn't work with groups of identical names. Say..

[> Hammer]
..
..
..
[> Hammer]
..
..
..
[> Tree]
..
..

When expanding multiple Hammers it fails to calculate the client height correctly as only one Hammer is considered.

As a quick fix I made the group name unique by adding six random characters to the end of it before it's added to the sections TLIst.

Great gadget BTW Josh, I'm finding a lot of your code archive entries very useful for my current project.