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:

Re: PureFORM 1.99 (yet another FORM designer)

Post by gnozal »

John(ny) wrote:1.) what is the "normal" or the "perfekt" place for toolbars, create with you toolbar builder?
It's a matter of taste, I'd say.
John(ny) wrote:2.) When i put it direktly to the first window, an then put an container on that window, to create an second toolbar, then i can not chance the first toolbar.
What goes wrong?
I don't know.
Try the project below : there are 3 toolbars on the same window.

Code: Select all

PureFORM_Project_Begin
Project¶ToolbarExample
Window¶1¶#Window_0¶348782592¶#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_TitleBar¶Window_0¶450¶200¶355¶293¶0¶10¶10¶0¶5000¶5000¶0¶-1¶0¶¶\6¸¸1·\7¸¸2·\8¸¸3¶
ContainerGadget¶1¶#Container_0¶1¶-1¶-1¶0¶0¶5¶0¶2¶#PB_Container_Raised¶¶¶-1¶0¶¶¶0¶0¶1¶0¶0¶5¶30¶35¶250¶0¶0¶0¶0¶0¶0·0·0·0·0·0·0¶0¶-1¶-1¶-1¶-1¶$W¸·\D¸¸3·\C¸¸2·\E¸¸1¶0¶¶0¶0
ContainerGadget¶2¶#Container_1¶1¶-1¶-1¶0¶0¶5¶0¶2¶#PB_Container_Raised¶¶¶-1¶0¶¶¶0¶0¶1¶0¶0¶50¶250¶295¶30¶0¶0¶0¶0¶0¶0·0·0·0·0·0·0¶0¶-1¶-1¶-1¶-1¶$W¸·\0¸¸1·\1¸¸2·\2¸¸3¶0¶¶0¶0
PureFORM_Project_End
Copy the 'code' and use PureFORM:Menu->Edit->Load project from clipboard.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
John(ny)
User
User
Posts: 23
Joined: Wed Nov 10, 2010 11:44 am
Location: Germany, Niedersachsen

Re: PureFORM 1.99 (yet another FORM designer)

Post by John(ny) »

Hi gnozal,

thanks.

I have load it, and check it out.

I will work the same way, that i have find out before.

Your sample; it is possible to change the toolbar on the containers_0,
but not the toolbar on the container_1,
and not the toolbaar on the back of the window_0

Do not know why: the Menü which should apper by click right will not apear (only on Container_0).

Can you in your own sample call the Menü (...to call "code injection) for the Container_1 or the Toolbaar on the back of the Window_0?
Best regards.
John(ny)
www.loetseite.de
less is more :-)
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureFORM 1.99 (yet another FORM designer)

Post by gnozal »

John(ny) wrote:I have load it, and check it out.
I will work the same way, that i have find out before.
Your sample; it is possible to change the toolbar on the containers_0,
but not the toolbar on the container_1,
and not the toolbaar on the back of the the window_0
In my example, to edit the toolbar for :
- Window #1 : right click on the window (not on a gadget) -> select 'Edit toolbar'
                OR deselect any container [hit the escape button] and click on the 'Tool' button in the gadget bar.
- Container #1 or #2 : right click on container -> select 'Edit toolbar'
                OR select container [container's edge is blue] and click on the 'Tool' button in the gadget bar.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
John(ny)
User
User
Posts: 23
Joined: Wed Nov 10, 2010 11:44 am
Location: Germany, Niedersachsen

Re: PureFORM 1.99 (yet another FORM designer)

Post by John(ny) »

Hello gnozal,

in my Hard- und Software it is not possible, like you discribe.

But it will work with other ways.

Thanks.
Best regards.
John(ny)
www.loetseite.de
less is more :-)
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Option button woes.

Post by jassing »

I put in 4 options; this worked fine.
I then realized I had to add a 5th.
this 5th act independently.
I looked at the properties, nothing to indicate that it should belong to an existing group of options...
I looked at the code - thinking they might need to be aligned a certain way -- all lined up nicely.
I renamed the option to be in the series. No go.
I then moved the option up to the rest (in code) and it works now.

But each time I generate code using PureForm -- I have to remember to g back and move that line of code around.

is there a way to fix this in pureform?
When I tried to "Read source" PureForm complained about the source not being part of a project.
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Option button woes.

Post by jassing »

Eureka -- resetting the tab order fixed that issue.

What would happen if I had two sets of radio buttons "next to each other" (like two columns of options) -- and the tab order is set -- they'd all appear as one group.
how would you distinguish them?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: Option button woes.

Post by gnozal »

jassing wrote:What would happen if I had two sets of radio buttons "next to each other" (like two columns of options) -- and the tab order is set -- they'd all appear as one group.
how would you distinguish them?
You could use a Frame3D ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: PureFORM 1.99 (yet another FORM designer)

Post by jassing »

Thanks -- but I meant code wise.
Let's say I have these options in two rows:

[ ] Blue [ ] Green [ ] Brown
[ ] Male [ ] Female

Since they are all one right after another, how do I allow users to pick from both rows? as it stands they appear to be able only to select one item.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: PureFORM 1.99 (yet another FORM designer)

Post by IdeasVacuum »

Hi Jassing

You can use containers:

Code: Select all

#Win   = 0
#Opts1 = 1
#Opts2 = 2

Procedure Opts()
;---------------

If OpenWindow(#Win, 0, 0, 160, 250, "Options Gadgets", #PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_ScreenCentered)

       ContainerGadget(#Opts1, 0,   0, 140, 120,#PB_Container_BorderLess) ; Posn Relative to Window
          OptionGadget(10,    30,  30,  60,  20, "Blue")                  ; Posn Relative to Container
          OptionGadget(11,    30,  60,  60,  20, "Green")
          OptionGadget(12,    30,  90,  60,  20, "Brown")
        SetGadgetState(10, 1)
       CloseGadgetList()

       ContainerGadget(#Opts2, 0, 120, 140, 80,#PB_Container_BorderLess) ; Posn Relative to Window
          OptionGadget(20,    30,   0,  60, 20, "Male")                  ; Posn Relative to Container
          OptionGadget(21,    30,  30,  60, 20, "Female")
        SetGadgetState(20, 1)
       CloseGadgetList()

EndIf

EndProcedure

Opts()

Repeat : Until WaitWindowEvent(1) = #PB_Event_CloseWindow
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Rename gadgets.

Post by jassing »

I wanted to rename some gadgets to give them more meaning.
I could rename them in pureform -- but I would have to edit each and every one of the code sections -- I tried opening them in uedit32 and doing a mass rename, this yeilded an unusable pbfi file.
Is there a way to rename a gadget and have that name propagate to the code?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: Rename gadgets.

Post by gnozal »

jassing wrote:I wanted to rename some gadgets to give them more meaning.
I could rename them in pureform -- but I would have to edit each and every one of the code sections -- I tried opening them in uedit32 and doing a mass rename, this yeilded an unusable pbfi file.
Is there a way to rename a gadget and have that name propagate to the code?
When you update a constant in PureFORM, all the generated code is updated, except the code you added manually via code infusion.
I could add this as a feature. I will see.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: PureFORM 1.99 (yet another FORM designer)

Post by jassing »

Right -- so as I change a gadget's name; I have to then go thru all the source to ensure it's also changed.... That would be most helpful.

Another thing I found is "copy gadget" (or clone gadget) doesn't copy the associated code with it...
Thanks.
-j
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureFORM 1.99 (yet another FORM designer)

Post by gnozal »

Update

Changes :
- When you rename a gadget (enumeration constant) in gadget properties, the code you added manually via code infusion is now also updated
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: PureFORM 1.99 (yet another FORM designer)

Post by jassing »

gnozal wrote:Update

Changes :
- When you rename a gadget (enumeration constant) in gadget properties, the code you added manually via code infusion is now also updated
Awesome change! thanks.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureFORM 1.99 (yet another FORM designer)

Post by gnozal »

jassing wrote:
gnozal wrote:When you rename a gadget (enumeration constant) in gadget properties, the code you added manually via code infusion is now also updated
Awesome change! thanks.
An additional note : since the infused code is plain text, PureFORM is performing a simple ReplaceString().
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Post Reply