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: getting "toggle child window" to stick?

Post by gnozal »

jassing wrote:
gnozal wrote:The [Main Window], [Child Window] and 'non child window' status is saved with the form (*.pbf file) [if a main window is defined].
bummer, because everytime I open it; I have to re-toggle it off.

Has happened in at least 3 project files...
Strange, seems to work here...
jassing wrote:Is there a way to copy objects & code to a new window/project? Or would I need to recreate the project?
You could try the templates [right click on gadget group to save, right click on window or container to load].

Anyway, if you have a look at the project file (*.pbf), you may notice that :
- the main window has it's gadget number followed by '$' : Window¶1$¶#Window_0¶...
- a toogled window has it's gadget number followed by '*' : Window¶2*¶#Window_Toggle¶...
- a child window has it's gadget number followed by nothing : Window¶3¶#Window_3¶...
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:

Re: PureFORM 1.99 (yet another FORM designer)

Post by gnozal »

Maitre_Kanter wrote:Corrected, missing Windows Definitions in previous post:

Code: Select all

#KF_UP       =       $8000
#KF_RECENTLY_PRESSED = $0001
Thanks, but I can't get the code to work with PB3.94.
Will try when I have more time.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Maitre_Kanter
User
User
Posts: 84
Joined: Mon Sep 06, 2010 3:05 pm

Re: PureFORM 1.99 (yet another FORM designer)

Post by Maitre_Kanter »

gnozal wrote:
Maitre_Kanter wrote:Corrected, missing Windows Definitions in previous post:

Code: Select all

#KF_UP       =       $8000
#KF_RECENTLY_PRESSED = $0001
Thanks, but I can't get the code to work with PB3.94.
Will try when I have more time.
Now, it's compliant with Purebasic 3.94 and Tested on Windows 7 64bits [PASS]

Code: Select all

;- enumeration (Windows)
#KF_UP       =          $8000
#KF_RECENTLY_PRESSED =  $0001

;- enumeration (Owner)
#KEY_UP = 0
#KEY_DOWN  = 1
#KEY_STILL_DOWN  = 2

;- Globals (Purebasic 3.94 : No Unsigned U type)
Global    F5_KeyCurrentState.l
Global    F5_KeyTrigger.l

OpenWindow( 0 , 20 , 20 , 20 , 20 , #PB_Window_ScreenCentered ,"Test KeyUp" )

;{- Event loop
Repeat
  ;:PureFORM:Loop:Start:
  Delay(1)
  
  WaitWindowEvent()
  
  F5_KeyCurrentState = GetAsyncKeyState_(#VK_F5)
   
  (Purebasic 3.94 : No Unsigned U type so F5_KeyCurrentState is negative when it's > $7FFF)
  If ( F5_KeyCurrentState < 0 )
  
    Select ( F5_KeyCurrentState & (#KF_UP | #KF_RECENTLY_PRESSED ))
      Case #KF_UP | #KF_RECENTLY_PRESSED
        F5_KeyTrigger = #KEY_DOWN
      Case #KF_UP
        F5_KeyTrigger = #KEY_STILL_DOWN    ;repeat     
    EndSelect
  Else
    If ( F5_KeyTrigger >= #KEY_DOWN )
      F5_KeyTrigger = #KEY_UP
      Debug "#KEY_UP" 
    EndIf
  EndIf      
      
  ;:PureFORM:Loop:End:
ForEver      
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 :
 - changed some of PureFORM's internal code according to Maitre_Kanter's suggestion (regarding keyboard shortcuts).
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:

Re: PureFORM 1.99 (yet another FORM designer)

Post by nicolaus »

HI gnozal,

i have found a bug in PureFORM.
If you put 2 or more Container Gadgets to a Window and set all to Hide expect the 2. or 3. or so and create the code, the code to hide the ContainerGadget will not be safed.
I hope you know what i mean. If not i can post also a sample.


[EDIT]
It looks that the setting "disable / enable" dose also not be saved in the code for Buttons.
[/EDIT]

Cheers,
Nico
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 »

nicolaus wrote:HI gnozal,
i have found a bug in PureFORM.
If you put 2 or more Container Gadgets to a Window and set all to Hide expect the 2. or 3. or so and create the code, the code to hide the ContainerGadget will not be safed.
I hope you know what i mean. If not i can post also a sample.
It looks that the setting "disable / enable" dose also not be saved in the code for Buttons.
Hi nicolaus,
this is not a bug.
As stated in the help file, Disable / Hide is designed for building the form, not for code generation.
PureFORM.chm wrote:Disable / Hide :
You can hide and/or disable the gadget in the form. This can be handy if you have several layers of gadgets.
The hidden or disabled state is not translated during code generation.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
menschmarkus
User
User
Posts: 18
Joined: Fri Dec 28, 2012 11:23 pm
Location: Center Germany

Tab order and PanelGadget order within PureForm Designer

Post by menschmarkus »

Hi Gnozal,

I use PureForm for a time and I am very satisfied with it.
Possibly someone asked this earlier but I did not read previous 100 pages of this topic.

I had a window where I used PanelGadget with 12 Panels. For organization I would like to move one panel to an other position including its content. I would copy (move) the content gadgets but I did not find a way to include a new panel into a specific position. How can I solve this problem?
I know, I can copy the source and replace complete gadgetlist of one panel to the correct position but I need to do this every time I make changes to the window. I think this is a cumbersome work.

As second thing I would like to organize specific TAB order of StringGadgets and ButtonGadgets and would like to disable tab order of other gadgets. I could not find something for this as well.

It would be great If I could organize these thing inside PureForm.

Thanks for you assistance

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

Re: Tab order and PanelGadget order within PureForm Designer

Post by gnozal »

menschmarkus wrote:I had a window where I used PanelGadget with 12 Panels. For organization I would like to move one panel to an other position including its content. I would copy (move) the content gadgets but I did not find a way to include a new panel into a specific position. How can I solve this problem?
You may use the context menu (right-click on the PanelGadget) to swap tab positions (including their content).
menschmarkus wrote:As second thing I would like to organize specific TAB order of StringGadgets and ButtonGadgets and would like to disable tab order of other gadgets. I could not find something for this as well.
Afaik, the only way to remove gadgets from the tab order is to use API in order to remove the #WS_TABSTOP style, like SetWindowLong_(GadgetID, #GWL_STYLE, GetWindowLong_(GadgetID, #GWL_STYLE) & ~#WS_TABSTOP)).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
menschmarkus
User
User
Posts: 18
Joined: Fri Dec 28, 2012 11:23 pm
Location: Center Germany

Re: PureFORM 1.99 (yet another FORM designer)

Post by menschmarkus »

Gnozal,

thanks for your quick reply. Found swap in context menu. Perfect. :D
Regarding TAB stop, thanks for your hint :)

menschmarkus

General impression of PureForm: :mrgreen:
As soon you do it right, it works !
jassing
Addict
Addict
Posts: 1745
Joined: Wed Feb 17, 2010 12:00 am

PureForm wishlist ("use select")

Post by jassing »

I would prefer (readability) to use the option of "Use Select statements" -- however, it poses a problem for other code
When using IF/elseif/endif -
Event = WaitWindowEvent(10)

So you can query a variable in your sub routines.
When you use a select, the WaitWindowEvent() is placed directly in the Select statement, so you can never get that event ID outside of the select / endselect context.

Would be nice if it would assign to a variable before using Select.
jassing
Addict
Addict
Posts: 1745
Joined: Wed Feb 17, 2010 12:00 am

PureForm using depreciated....

Post by jassing »

Just doing a mock up for proof of concept; used pureform to generate the code.
Compiler dished out a warning "Depreciated function 'CreateGadgetList()' used"
Is there a way to turn that off?
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: PureForm using depreciated....

Post by Shield »

You have the option to turn off warnings in the compiler settings...however, it doesn't seem to work. :?
But you can just remove the call as it's no longer necessary.
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
jassing
Addict
Addict
Posts: 1745
Joined: Wed Feb 17, 2010 12:00 am

Re: PureForm using depreciated....

Post by jassing »

Shield wrote:You have the option to turn off warnings in the compiler settings...however, it doesn't seem to work. :?
But you can just remove the call as it's no longer necessary.
My point was that PureForm shouldn't be putting it in to begin with, since it's no longer needed...
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: PureForm using depreciated....

Post by Shield »

Oh I didn't realize there was a sub-forum dedicated to PureForm. :?
In that case...should be fixed ^_^.
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: PureForm using depreciated....

Post by MachineCode »

It is needed for PureBasic 4.20 and lower, which some people still use (especially 3.94). Having said that, they really need to get with the times and upgrade. :)
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
Post Reply