PureFORM 1.99 (yet another FORM designer)

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

Moderator: gnozal

dige
Addict
Addict
Posts: 1391
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post by dige »

Ok, I show you what I did:

First create 2 container with some stuff:
Image

Second create a Splitter Gadget
Image

Klicked inside the Window:
Image

Seems, that the Splitter is to small?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

@dige
Like it is explained in the help file, you have to draw the splitter like any other gadget.
If you just click, the splitter has the minimal size.

Example :
- Two gadgets to join
Image
- New splitter dialog
Image
- Draw the splitter
Image
- Splitter is here
Image
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
dige
Addict
Addict
Posts: 1391
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post by dige »

@gnozal: thank you ... seems that I'm to stupid :oops:
I thougt that nice "Add Splitter Requester"
Image
would do the job.
Molchyn
User
User
Posts: 42
Joined: Thu Jan 29, 2004 12:54 am

Post by Molchyn »

gnozal
Sorry I can't reproduce bug, probably I made a lot of manipulations before it's happened :oops:
michel
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Feb 19, 2007 5:47 pm
Location: Luxemburg

PureFORM, Checkboxgadget

Post by michel »

Hello Gnozal,

- Enabling PureCOLOR in a CheckBoxGadget turns it to black background instead of showing the background image of the window.

- Wish: It would be great if it was possible do distribute selected gadgets in a group horizontally and vertically with the same distance.

Michel
michel
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Feb 19, 2007 5:47 pm
Location: Luxemburg

PureFORM, horizontal & vertical distribution of gadgets

Post by michel »

Hello Gnozal,

Sorry for my remark, the distribution works fine.

Michel
michel
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Feb 19, 2007 5:47 pm
Location: Luxemburg

PureFORM, horizontal & vertical distribution of gadgets

Post by michel »

Hello Gnozal,

Sorry for my remark, the distribution works fine.

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

Re: PureFORM, Checkboxgadget

Post by gnozal »

michel wrote:- Enabling PureCOLOR in a CheckBoxGadget turns it to black background instead of showing the background image of the window.
Works here :
Image

Form :

Code: Select all

;{[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¶461¶359¶318¶183¶0¶10¶10¶0¶5000¶5000¶1¶$C:\PureBasic394\Examples\Sources\Data\clouds.jpg¶0¶¶¶
;CheckBoxGadget¶1¶#CheckBox_0_MyTransparentCheckbox¶1¶-1¶-1¶0¶0¶3¶0¶0¶¶My transparent Checkbox¶¶-1¶0¶¶¶0¶0¶0¶0¶0¶55¶16¶189¶50¶0¶0¶0¶0¶0¶0¶1¶255¶-16777216¶-1¶-1¶¶0¶¶0¶0
;OptionGadget¶2¶#Option_1_MyTransparentOption¶1¶-1¶-1¶0¶0¶18¶0¶0¶¶My transparent Option¶¶-1¶0¶¶¶0¶0¶0¶0¶0¶22¶87¶254¶44¶0¶0¶0¶0¶0¶0¶1¶65535¶-16777216¶-1¶-1¶¶0¶¶0¶0
;PureFORM_Project_End
;}
Generated window code :

Code: Select all

Procedure OpenWindow_Window_0()
  If OpenWindow(#Window_0, 461, 359, 318, 183, "Window_0", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
    If CreateGadgetList(WindowID(#Window_0))
      CheckBoxGadget(#CheckBox_0_MyTransparentCheckbox, 55, 16, 189, 50, "My transparent Checkbox")
      OptionGadget(#Option_1_MyTransparentOption, 22, 87, 254, 44, "My transparent Option")
      ; Gadget Colors
      PureCOLOR_SetGadgetColor(#CheckBox_0_MyTransparentCheckbox, $FF, #PureCOLOR_DontSetBackColor)
      PureCOLOR_SetGadgetColor(#Option_1_MyTransparentOption, $FFFF, #PureCOLOR_DontSetBackColor)
      ; Window Background Image
      BackgroundImage_Window_0_Brush = CreatePatternBrush_(CatchImage(#BackgroundImage_Window_0, ?BackgroundImage_Window_0))
      If BackgroundImage_Window_0_Brush
        SetClassLong_(WindowID(#Window_0), #GCL_HBRBACKGROUND, BackgroundImage_Window_0_Brush)
        RedrawWindow_(WindowID(#Window_0), 0, 0, #RDW_ERASE | #RDW_FRAME | #RDW_INVALIDATE | #RDW_ALLCHILDREN)
        FreeImage(#BackgroundImage_Window_0)
      EndIf
    EndIf
  EndIf
EndProcedure
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

- Enabling PureCOLOR in a CheckBoxGadget turns it to black background instead of showing the background image of the window.
This behaviour is generally present only if xp skins are enabled, at least in my experience. All is normal without skin support selected.
BERESHEIT
michel
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Feb 19, 2007 5:47 pm
Location: Luxemburg

PureFORM PureCOLOR & Checkboxgadget

Post by michel »

Hello Gnozal,

I checked the remark of netmaestro, the problem was due to the compiler selection "enable XP skin". After disabling it everything works fine.

Michel
Nico
Enthusiast
Enthusiast
Posts: 274
Joined: Sun Jan 11, 2004 11:34 am
Location: France

Post by Nico »

Quelques bugs voir sur le Forum Français:
http://www.purebasic.fr/french/viewtopi ... 1694#61694
michel
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Feb 19, 2007 5:47 pm
Location: Luxemburg

PureFORM user defined colors / Gadget groups

Post by michel »

Hello Gnozal,

Here some strange behaviours that I discovered:

- You can define user colors and attribute them to one of the 16 custom color fîelds, unfortunately these colors are not stored. So it is impossible to give several gadgets the same custom color.

- With the gadget group tool you attribute automatically a name to the group: Gadget group 1, Gadget group 2 ...
Suppose you have group 1 2 3 4 and for one reason you delete group 3 then you want to create a new one, this time you will get an error telling you that group 4 already exists.

michel
michel
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Feb 19, 2007 5:47 pm
Location: Luxemburg

PureFORM Multilanguage support, datasection refresh

Post by michel »

Hello Gnozal,

I think there is a problem with the refresh of the default language data section:
Changing the items of a panel gadget works in the graphic editor, the texts are shown in the gadget but the new texts are not updated in the data section of the default language. Could you please check this.

Thank you

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

Re: PureFORM Multilanguage support, datasection refresh

Post by gnozal »

michel wrote:I think there is a problem with the refresh of the default language data section:
Changing the items of a panel gadget works in the graphic editor, the texts are shown in the gadget but the new texts are not updated in the data section of the default language. Could you please check this.
You mean the tab text ? I can't reproduce the problem
I created this form

Code: Select all

;{[PureFORM Project]
;PureFORM_Project_Begin
;Project¶MyProject
;Window¶1¶#Window_0¶13500416¶#PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar¶Window_0¶451¶215¶400¶400¶0¶10¶10¶0¶5000¶5000¶0¶-1¶0¶¶¶
;PanelGadget¶1¶#Panel_0_0¶1¶-1¶-1¶3¶0¶19¶0¶0¶¶¶¶-1¶0¶¶¶0¶0¶1¶1¶4¶46¶89¶280¶232¶0¶0¶0¶0¶0¶0¶0¶-1¶-1¶-1¶-1¶Tab 1·Tab number 2·Tab 3¶0¶¶0¶0
;PureFORM_Project_End
;}
changed some tab text, saved the form, reloaded the form, changed tab text again, and the language datasection is updated.

Code: Select all

;{- Enumerations / DataSections
;{ Windows
Enumeration
  #Window_0
EndEnumeration
;}
;{ Gadgets
Enumeration
  #Panel_0_0
EndEnumeration
;}
;{ MultiLanguage support
Enumeration
  #Window_0_W_Lng
  ;
  #Panel_0_0_Lng
EndEnumeration
#MaxLanguageItems = #PB_Compiler_EnumerationValue - 1
;{ Default language items
DataSection ;>
DefaultLanguage:
  Data.s "Window_0"
  ;
  Data.s "Tab 1|Tab number 2|Tab 3"
EndDataSection ;<
;}
Global Dim LanguageItem.s(#MaxLanguageItems)
; Load default language
Restore DefaultLanguage
For LanguageItemIdx = 0 To #MaxLanguageItems
  Read LanguageItem(LanguageItemIdx)
Next
; Load language catalog
Procedure ReadLanguageFile(Catalog.s) ; Read language file
  Protected Stream.l, LanguageItemIdx.l
  Stream = ReadFile(#PB_Any, Catalog)
  If Stream
    While Eof(Stream) = #False
      LanguageItem(LanguageItemIdx) = ReadString(Stream)
      LanguageItemIdx + 1
      If LanguageItemIdx > #MaxLanguageItems
        Break
      EndIf
    Wend
    CloseFile(Stream)
  EndIf
EndProcedure
;}
;}
Procedure OpenWindow_Window_0()
  If OpenWindow(#Window_0, 451, 215, 400, 400, LanguageItem(#Window_0_W_Lng), #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
    If CreateGadgetList(WindowID(#Window_0))
      PanelGadget(#Panel_0_0, 46, 89, 280, 232) ;>
        ; Tab 1
        AddGadgetItem(#Panel_0_0, -1, StringField(LanguageItem(#Panel_0_0_Lng), 1, "|"))
        ; Tab number 2
        AddGadgetItem(#Panel_0_0, -1, StringField(LanguageItem(#Panel_0_0_Lng), 2, "|"))
        ; Tab 3
        AddGadgetItem(#Panel_0_0, -1, StringField(LanguageItem(#Panel_0_0_Lng), 3, "|"))
      CloseGadgetList() ;<
    EndIf
  EndIf
EndProcedure

etc...
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 user defined colors / Gadget groups

Post by gnozal »

michel wrote:- You can define user colors and attribute them to one of the 16 custom color fîelds, unfortunately these colors are not stored. So it is impossible to give several gadgets the same custom color.
I could add some 'Last chosen color' button ?
michel wrote:- With the gadget group tool you attribute automatically a name to the group: Gadget group 1, Gadget group 2 ...
Suppose you have group 1 2 3 4 and for one reason you delete group 3 then you want to create a new one, this time you will get an error telling you that group 4 already exists.
Confirmed, will fix this.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Post Reply