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 »

PB wrote:>> [...] black text on my black background
>
> I made a little change. I hope it works now.

Yes, now the text shows when I type it, but there's no cursor seen, so it must
be black on my black background? Makes it hard to see where I'm typing. ;)
Ok, will see what I can do.
PB wrote:Also, there's no capitalization, eg. if I type "debug" it doesn't become "Debug".
Is that something you might be able to add in later?
If you need complete editor features, you can use the 'embedded jaPBe' option. I don't think I will add jaPBe like features to the PureFORM scintilla editor.
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 »

PB wrote:>> [...] black text on my black background
>
> I made a little change. I hope it works now.

Yes, now the text shows when I type it, but there's no cursor seen, so it must
be black on my black background? Makes it hard to see where I'm typing. ;)
PureFORM updated : now the caret color is also imported from Purebasic preferences.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> PureFORM updated : now the caret color is also imported from Purebasic preferences

Awesome, works great! :D
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update

Changes :
- when adding a new gadget, PureFORM now displays the future gadget width and height while drawing the selection rectangle
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Nico
Enthusiast
Enthusiast
Posts: 274
Joined: Sun Jan 11, 2004 11:34 am
Location: France

Post by Nico »

Il y a un problème avec la propriété Enum on ne peux pas faire:
#Button_Valid et #Button_Annuler car il commence par les mêmes lettres et PureForm l'efface automatiquement, c'est moyen.

Aussi pour une fenêtre si on met la constante invisible, la fenêtre disparait, du coup on ne peux plus rien faire.

Sinon bravo pour le Translate, ça m'a été super utile. :D
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

<french>
Nico wrote:Il y a un problème avec la propriété Enum on ne peux pas faire:
#Button_Valid et #Button_Annuler car il commence par les mêmes lettres et PureForm l'efface automatiquement, c'est moyen.
Si on peut :
;{[PureFORM Project]
;PureFORM_Project_Begin
;Project¶PureFORM_Clipboard2
;Window¶1¶#Window_0¶13500416¶#PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar¶#Window_0¶450¶200¶400¶400¶0¶10¶10¶0¶5000¶5000¶0¶-1¶0¶¶
;ButtonGadget¶1¶#Button_Valid¶1¶-1¶-1¶0¶0¶0¶0¶0¶¶Gadget_0¶¶-1¶0¶¶¶0¶0¶0¶0¶0¶116¶27¶183¶27¶0¶0¶0¶0¶0¶0¶0¶-1¶-1¶-1¶-1¶¶0¶¶0¶0
;ButtonGadget¶2¶#Button_Annuler¶1¶-1¶-1¶0¶0¶0¶0¶0¶¶Gadget_1¶¶-1¶0¶¶¶0¶0¶0¶0¶0¶126¶77¶190¶29¶0¶0¶0¶0¶0¶0¶0¶-1¶-1¶-1¶-1¶¶0¶¶0¶0
;PureFORM_Project_End
;}
Il suffit de faire attention à ne pas saisir un texte qui correspond à une constante qui existe déjà (c'est un peu restrictif, d'accord).
Nico wrote:Aussi pour une fenêtre si on met la constante invisible, la fenêtre disparait, du coup on ne peux plus rien faire.
Ben oui, quand c'est invisible on le voit pas. J'ai choisi de tenir compte de tous les flags. Pour faire réapparaître la fenêtre, il suffit de décocher le flag dans la fenêtre 'Window properties' qui elle reste visible.
Nico wrote:Sinon bravo pour le Translate, ça m'a été super utile. :D
Merci, çà m'a été très utile aussi !
</french>
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Nico
Enthusiast
Enthusiast
Posts: 274
Joined: Sun Jan 11, 2004 11:34 am
Location: France

Post by Nico »

Pour moi, ça n'a aucun sens, alors si je veux créer une fenêtre avec le flag invisible et pouvoir continuer à travailler dessus, je ne peux pas?

C'est pareil pour les coordonnées de la fenêtre, il faudrait une fois qu'on l'a positionnée, pouvoir verrouiller ces données, pour qu'ensuite l'utilisateur puisse positionner sa fenêtre pour travailler correctement!

Je suis très impressionné par le travail que tu as fourni, du coup le concepteur de Visuel me déçoit beaucoup, pourrait tu me dire le temps de travail pour une telle réalisation?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

<french>
Nico wrote:Pour moi, ça n'a aucun sens, alors si je veux créer une fenêtre avec le flag invisible et pouvoir continuer à travailler dessus, je ne peux pas?
Pourquoi ne pas cocher le flag 'invisible' quand tu as terminé de travailler dessus ? Je vais y réfléchir.
Nico wrote:C'est pareil pour les coordonnées de la fenêtre, il faudrait une fois qu'on l'a positionnée, pouvoir verrouiller ces données, pour qu'ensuite l'utilisateur puisse positionner sa fenêtre pour travailler correctement!
Je vais y réfléchir. Personnellement, j'utilise les flags 'Window/Screen...centered' qui vont repositionner la fenêtre, donc x et y n'ont aucune importance .
Nico wrote:Je suis très impressionné par le travail que tu as fourni, du coup le concepteur de Visuel me déçoit beaucoup, pourrait tu me dire le temps de travail pour une telle réalisation?
Environ 3 mois (difficile à dire, uniquement sur du temps libre, soirée / weekend).
</french>
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 »

Update

Changes :

- added 'Don't enable #PB_Window_Invisible in form' in Preferences ; if checked, the window with #PB_Window_Invisible flag remains visible.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

I found it more useful, if always visible in FormDesigner and create code like this:

Code: Select all

Procedure OpenWindow_Window_0()
  If OpenWindow(#Window_0, 518, 177, 400, 400, "#Window_0", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar|#PB_Window_Invisible)
    If CreateGadgetList(WindowID(#Window_0))
    EndIf
  EndIf
EndProcedure

OpenWindow_Window_0()
HideWindow(#Window_0, #False)
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

ts-soft wrote:I found it more useful, if always visible in FormDesigner and create code like this:

Code: Select all

Procedure OpenWindow_Window_0()
  If OpenWindow(#Window_0, 518, 177, 400, 400, "#Window_0", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar|#PB_Window_Invisible)
    If CreateGadgetList(WindowID(#Window_0))
    EndIf
  EndIf
EndProcedure

OpenWindow_Window_0()
HideWindow(#Window_0, #False)
You can already do something like that with the code infusion feature.
1. Create a window (#Window_0)
2. Open Code Infusion editor [F8]
3. Add "HideWindow(#Window_0, #False)" in event 'Window Creation' for #Window_0
Generated code :

Code: Select all

Procedure OpenWindow_Window_0()
  If OpenWindow(#Window_0, 450, 200, 400, 119, "#Window_0", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar|#PB_Window_Invisible)
    If CreateGadgetList(WindowID(#Window_0))
      ButtonGadget(#ButtonGadget_0, 44, 33, 326, 46, "Gadget_0")
      ;
      HideWindow(#Window_0, #False)
    EndIf
  EndIf
EndProcedure
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

this way is okay, thanks

can you add a function for #PB_Ignore, is required for tools that someone use in multiple instances? allways the same place isn't good for this.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

ts-soft wrote:can you add a function for #PB_Ignore, is required for tools that someone use in multiple instances? allways the same place isn't good for this.
#PB_Ignore for x, y, like #CW_USEDEFAULT ?
Personally I always use #PB_Window_ScreenCentered or #PB_Window_WindowCentered, so x, y are ignored anyway.
I will think about it.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

gnozal wrote:#PB_Ignore for x, y, like #CW_USEDEFAULT ?
Yes, screencentered doesn't help. if you run my program twice, you don't see the first one :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update

Changes :
- for each window, you can now choose to use default values for X,Y in the generated code (PB3.94 : #CW_USEDEFAULT ; PB4.0x : #PB_Ignore)
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Post Reply