PureFORM 1.99 (yet another FORM designer)

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

nicolaus wrote:Hi gnozal and thanks for the example.
Now im a little bit confused.... your example works fine here but if i do this with my project it works only the first time.
If i save the project and reload it in PureFORM, the Fram3DGadget is not longer in the right item of the panel.
Like I said, if your project is corrupt, it will not work ...
Open the pbf file with a text editor.
Here an example of your CORRUPT project.
The second field for each gadget is the gadget number (here -372 and -370 : this is not normal) and the 5th field is the parent gadget number (here -1 [none] for PanelGadget and -372 for Frame3D).

Code: Select all

PureFORM_Project_Begin
Project¶admin_conf_form
Window¶1¶#Window_0¶348651522¶#PB_Window_SystemMenu|#PB_Window_TitleBar|#PB_Window_WindowCentered¶Window_0¶272¶194¶522¶357¶0¶10¶10¶0¶5000¶5000¶0¶-1¶0¶¶¶
PanelGadget¶-372¶#admi_pan¶1¶-1¶-1¶3¶0¶19¶0¶0¶¶¶¶-1¶0¶¶¶0¶0¶1¶1¶4¶0¶0¶520¶355¶0¶0¶0¶0¶0¶0¶0¶-1¶-1¶-1¶-1¶Default·User·Programm¶0¶¶0¶0
Frame3DGadget¶-370¶#f3d_admpan_conf¶1¶-372¶19¶1¶0¶11¶0¶0¶¶Adminconfig¶¶-1¶0¶¶¶0¶0¶0¶0¶0¶0¶-20¶5¶5¶0¶0¶0¶0¶0¶0¶0¶-1¶-1¶-1¶-1¶¶0¶¶0¶0
PureFORM_Project_End
To fix your form replace the gadget number with valid values.
For example : 372 -> 0 and 370 -> 1. And here is the fixed form (I also fixed the Frame3D coordinates) :

Code: Select all

PureFORM_Project_Begin
Project¶admin_conf_form
Window¶1¶#Window_0¶348651522¶#PB_Window_SystemMenu|#PB_Window_TitleBar|#PB_Window_WindowCentered¶Window_0¶494¶222¶522¶357¶0¶10¶10¶0¶5000¶5000¶0¶-1¶0¶¶¶
PanelGadget¶0¶#admi_pan¶1¶-1¶-1¶3¶0¶19¶0¶0¶¶¶¶-1¶0¶¶¶0¶0¶1¶1¶4¶0¶0¶520¶355¶0¶0¶0¶0¶0¶0¶0¶-1¶-1¶-1¶-1¶Default·User·Programm¶0¶¶0¶0
Frame3DGadget¶1¶#f3d_admpan_conf¶1¶0¶19¶1¶0¶11¶0¶0¶¶Adminconfig¶¶-1¶0¶¶¶0¶0¶0¶0¶0¶13¶8¶495¶318¶0¶0¶0¶0¶0¶0¶0¶-1¶-1¶-1¶-1¶¶0¶¶0¶0
PureFORM_Project_End
nicolaus wrote:Please can you write the way where you add a Fram3DGadget to a item of a PanelGadget?
Like any other gadget, there is nothing special : select the gadget class [right-click context menu or gadget bar] and draw your gadget on the PanelGadget client area (selection rectangle)
nicolaus wrote:1. how i can move a gadget wat is insite a item of a PanelGadget to another item? Only Cut and Past?
Cut/Paste or using gadget groups (for 2 or more items).
nicolaus wrote:2. Is it normal that, if i cut a Gadget wat is inside a item of a Panelgadget and past it into another item, the name from the cut and past gadget is changed?
Yes. It's a new gadget, so it has a new name (enumeration and text).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

gnozal wrote:
nicolaus wrote:2. Is it normal that, if i cut a Gadget wat is inside a item of a Panelgadget and past it into another item, the name from the cut and past gadget is changed?
Yes. It's a new gadget, so it has a new name (enumeration and text).
thanks for fast answhere!
but i think if i cut a gadget and past it, it is not a new gadget. so the better way by cut/past is to hold all the settings and so of the cuted gadget.

And can you add a arrows for moving gadgets? It is a better way as cut/past so i think.

thanks and regards,
nico
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

the next one:

If have do a mouse group selection and after that PureFORM crasht with this message:

Image
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

ok and one more i have found:

If you have a TextGadget in a Window and set the gadget option "disable gadget" for the TextGadget, this dont work if you save the code.



regards,
Nico
Pantcho!!
Enthusiast
Enthusiast
Posts: 538
Joined: Tue Feb 24, 2004 3:43 am
Location: Israel
Contact:

Post by Pantcho!! »

@Gnozal

I am using your PureForm lately and it works great.

I just noticed this little problem.
When i am editing the gadget const name

if i have one called #LABEL1
and i try to create a new gadget and name it #LABEL?
what ever i insert in the ? i get - already exist gadget.

can it verify it AFTER i hit space or zoom out of the string gadget box where i enter the name?

Also sometimes when i write for example #LABEL1

and i continue work on the design i get new name as #LABEL
like it discards the last char.

And a little feature that can be smart and simple.

When adding images as DataSections can it be possible to
pack the image file and the when catching the image unpack the datasection memory buffer and then catch the image

here is an example on the tricks and tips:
http://www.purebasic.fr/english/viewtopic.php?t=14406

I think it can also reduce exe size and also protect images from being ripped with some resources ripper ... it adds some kind of protection i think.

Thanks.
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

When I use PureForm to create a program with two windows, how can I make one Window the default? So that when I click a button on the main window, the second opens up ontop of the main window and deactivating the main window?
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Holly
User
User
Posts: 10
Joined: Sat May 24, 2003 6:05 am
Location: Tampa, Florida

Post by Holly »

When I open PureForm the only active window is the Gadget Group window. None of the other windows or menu items respond to clicks. I have to end task to close the program. Anyone have any ideas why? It works on my other computers. They're all XP.

Thanks.

Holly
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

nicolaus wrote:If you have a TextGadget in a Window and set the gadget option "disable gadget" for the TextGadget, this dont work if you save the code.
Not a bug. The disable feature is only active while building a form. It is not saved. It should be named 'Lock gadget' ...
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

nicolaus wrote:If have do a mouse group selection and after that PureFORM crash
I can't reproduce this. Can you post the steps to reproduce this on a new form, thanks ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Pantcho!! wrote:@Gnozal
I am using your PureForm lately and it works great.
I just noticed this little problem.
When i am editing the gadget const name ...
The 'unique enumeration' check is done when you modify the string box.
Pantcho!! wrote:can it verify it AFTER i hit space or zoom out of the string gadget box where i enter the name?
I already tried this some times ago, and it didn't work, seems like I was missing some events ? PureFORM is a real event nightmare, with a windows callback and subclassing callbacks ...
But I might try again.
Pantcho!! wrote: And a little feature that can be smart and simple.
When adding images as DataSections can it be possible to pack the image file and the when catching the image unpack the datasection memory buffer and then catch the image
I may add this feature. Meanwhile, how about using PNG / JPG images : there are already compressed. Note that packing the images with the JCalG1 internal routine isn't that safe, if that's your main concern (look at the 'JC' signatures ...).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

GeoTrail wrote:When I use PureForm to create a program with two windows, how can I make one Window the default? So that when I click a button on the main window, the second opens up ontop of the main window and deactivating the main window?
Maybe I don't understand what you mean, but if you check 'Show only selected window' in the window list, you see only one project window at the time, wich can be handy in a multi-window project.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
PureLust
Enthusiast
Enthusiast
Posts: 477
Joined: Mon Apr 16, 2007 3:57 am
Location: Germany, NRW

Post by PureLust »

GeoTrail wrote:When I use PureForm to create a program with two windows, how can I make one Window the default? So that when I click a button on the main window, the second opens up ontop of the main window and deactivating the main window?
As far as I understood your question, it's a thing you have to handle by your own in your program.

- To open/show the 2nd Window, just reakt on the Button-Click-Event in your Main-Window and open or unhide the 2nd Window.
- To disable the Main-Window, you can just use the DisableWindow() Command.
- After closing the 2nd Window, don't forget to enable the Main-Window again.

Hope this was what you were looking for ... greets, PL.
Last edited by PureLust on Tue May 29, 2007 9:35 am, edited 1 time in total.
[Dynamic-Dialogs] - create complex GUIs the easy way
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
PureLust
Enthusiast
Enthusiast
Posts: 477
Joined: Mon Apr 16, 2007 3:57 am
Location: Germany, NRW

Post by PureLust »

@gnozal:

Thanks again for all these greate improvements. :D

Relating to how gadgets can be moved and copied to other panels etc., the things one can do with Gadget-Groups are really great so far.
But at the moment one can not do this with a single Gadget.
Could you add the facility, to save a single Gadget as a Gadget-Group as well? So it will be possible to use the same strong funktions to move and copy even for a single Gadget.

ThanX and greets, PureLust.
[Dynamic-Dialogs] - create complex GUIs the easy way
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

PureLust wrote:Could you add the facility, to save a single Gadget as a Gadget-Group as well?
You already can (but not using context menu).
1. Open Gadget groups
2. New group
3. Add group
4. Add gadgets
5. Click on gadget
6. Return
-> You have a gadget group with one gadget
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
PureLust
Enthusiast
Enthusiast
Posts: 477
Joined: Mon Apr 16, 2007 3:57 am
Location: Germany, NRW

Post by PureLust »

gnozal wrote:You already can (but not using context menu).
I already detected this way, but it's a bit circumstantially - don't you think so?
Wouldn't it be an easy way just to eliminate the check for more than one selected Gadget in the context-menu, so that the "save group to ..." option is available for single Gadgets as well?
Or - if you keep the check - rename this menu-point to "save gadget to ..." as long as there is only one Gadget selected.
[Dynamic-Dialogs] - create complex GUIs the easy way
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
Post Reply