PureFORM 1.99 (yet another FORM designer)
Moderator: gnozal
Re: PureFORM 1.99 (yet another FORM designer)
Why does not provide multi-language software?
How to make a multi-language software?
How to make a multi-language software?
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: PureFORM 1.99 (yet another FORM designer)
I don't understand what you mean ?kanjia wrote:Why does not provide multi-language software?
How to make a multi-language software?
PureFORM has multi-language support : have a look at the 'Prepare multilanguage support' item in the preferences.
However, PureFORM does not support unicode (it's an ANSI executable).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Re: PureFORM 1.99 (yet another FORM designer)
Hi gnozal,
I use PureFORM to design a GUI that utilizes the Scintilla gadget. I configured PureForm not to insertinto the code, because I want to do this procedure in another include-file in my project.
I removed the content of InitCode in the PureFORM configuration, but the created source keeps containing the code. In the configuration for the Scintilla Gadget definitely is no more code for this, but it is allways integrated in the created source. What is wrong?
Kukulkan
I use PureFORM to design a GUI that utilizes the Scintilla gadget. I configured PureForm not to insert
Code: Select all
Procedure ScintillaCallBack(Gadget, *scinotify.SCNotification)
EndProcedure
I removed the content of InitCode in the PureFORM configuration, but the created source keeps containing the code. In the configuration for the Scintilla Gadget definitely is no more code for this, but it is allways integrated in the created source. What is wrong?
Kukulkan
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: PureFORM 1.99 (yet another FORM designer)
The modified custom gadget configuration applies to the newly created gadgets.Kukulkan wrote: I use PureFORM to design a GUI that utilizes the Scintilla gadget. I configured PureForm not to insertinto the code, because I want to do this procedure in another include-file in my project.Code: Select all
Procedure ScintillaCallBack(Gadget, *scinotify.SCNotification) EndProcedure
I removed the content of InitCode in the PureFORM configuration, but the created source keeps containing the code. In the configuration for the Scintilla Gadget definitely is no more code for this, but it is allways integrated in the created source. What is wrong?
To apply them to existing gadgets :
- load your project.
- go to custom gadget configuration in Preferences.
- select 'Scintilla Gadget'.
- click on the 'Update project' button and confirm.
- your project scintilla gadgets should have been updated with the new configuration.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Re: PureFORM 1.99 (yet another FORM designer)
Hi gnozal,
Thank you for the quick reply. I try'd the "Update project" button several times before (and now again) with no success. The code stays in the project - even if there is nothing in the InitCode field
Kukulkan
Thank you for the quick reply. I try'd the "Update project" button several times before (and now again) with no success. The code stays in the project - even if there is nothing in the InitCode field

Kukulkan
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: PureFORM 1.99 (yet another FORM designer)
Now that's odd.Kukulkan wrote:I try'd the "Update project" button several times before (and now again) with no success. The code stays in the project - even if there is nothing in the InitCode field![]()
I just tried and it works here !
Did you rename the custom gadget ('Name' field in properties) ? PureFORM relies on the gadget name to identify the gadget.
You can still modify your project by hand. Open the .pbf in an editor, locate the 'Custom Gadget¶' lines, remove the init code.
Example :
before : 'Custom Gadget¶...........¶0¶ScintillaGadget·If InitScintilla("Scintilla.dll") = 0\n End\nEndIf\nProcedure ScintillaCallBack(Gadget, *scinotify.SCNotification)\nEndProcedure·ScintillaGadget(%id%, %x%, %y%, %w%, %h%, @ScintillaCallback())···ScintillaGadget [Scintilla Library, Purebasic 4.10+]¶....'
after : 'Custom Gadget¶...........¶0¶ScintillaGadget··ScintillaGadget(%id%, %x%, %y%, %w%, %h%, @ScintillaCallback())···ScintillaGadget [Scintilla Library, Purebasic 4.10+]¶....'
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Re: PureFORM 1.99 (yet another FORM designer)
Hi,
No, the CustomGadget property "name" has not been changed. The only property I changed (deleted) was "InitCode".
After inserting, I changed the Enum-field to "#sciMessageBody" in the PureFORM editor. Nothing more has been done with this gadget...
It works after direct manipulation of the project-file. Thank you.
Kukulkan
No, the CustomGadget property "name" has not been changed. The only property I changed (deleted) was "InitCode".
After inserting, I changed the Enum-field to "#sciMessageBody" in the PureFORM editor. Nothing more has been done with this gadget...
It works after direct manipulation of the project-file. Thank you.

Kukulkan
Re: PureFORM 1.99 (yet another FORM designer)
Hi Gnozal,
The PANEL gadget still creates a gadget list
michel
The PANEL gadget still creates a gadget list
michel
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: PureFORM 1.99 (yet another FORM designer)
Hi michel,michel wrote:Hi Gnozal,
The PANEL gadget still creates a gadget list
michel
I don't understand what you mean ?
Here is the generated code :
Code: Select all
PanelGadget(#Panel_5, 15, 285, 370, 155)
AddGadgetItem(#Panel_5, -1, "Tab #1")
AddGadgetItem(#Panel_5, -1, "Tab #2")
AddGadgetItem(#Panel_5, -1, "Tab #3")
CloseGadgetList()
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Re: PureFORM 1.99 (yet another FORM designer)
Hello Gnozal,
I meant this warning by the compiler:
"deprecated function CreateGadgetList() is used"
Michel
I meant this warning by the compiler:
"deprecated function CreateGadgetList() is used"
Michel
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: PureFORM 1.99 (yet another FORM designer)
PureFORM only uses CreateGadgetList() if the detected PB compiler version is < 4.30 or no compiler could be found.michel wrote:Hello Gnozal,
I meant this warning by the compiler:
"deprecated function CreateGadgetList() is used"
Michel
What PB version does PureFORM report in the 'About' menu ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Re: PureFORM 1.99 (yet another FORM designer)
Hi Gnozal,
You are right, I realized that the problem only occurs when I am working with the USB-stick (portable) version. How can I manage that Pureform recognizes the compiler version on the stick?
Michel
You are right, I realized that the problem only occurs when I am working with the USB-stick (portable) version. How can I manage that Pureform recognizes the compiler version on the stick?
Michel
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: PureFORM 1.99 (yet another FORM designer)
Assuming PB is on the USB stick, you may change the compiler path in Menu : Setup -> Configuration -> Code (or edit manually PureFORM.ini, like "FORM_CompilerPath = \PureBasic\Compilers\PBCompiler.exe" ).michel wrote:You are right, I realized that the problem only occurs when I am working with the USB-stick (portable) version. How can I manage that Pureform recognizes the compiler version on the stick?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- User
- Posts: 81
- Joined: Thu Sep 23, 2010 4:22 am
Re: PureFORM 1.99 (yet another FORM designer)
Can I suggest a update to your app?
I found a bug when the toolbar button text use Russian characters, so I wrote a single procedure to check if the string is Unicode.
I found a bug when the toolbar button text use Russian characters, so I wrote a single procedure to check if the string is Unicode.
Code: Select all
Procedure IsUnicode(String.s)
Protected.l i, bLen
Protected Dim Mapp.a(0)
If Len(String)
ReDim Mapp(StringByteLength(String))
CopyMemory(@String, @Mapp(0), StringByteLength(String))
bLen = ArraySize(Mapp())
For i = 1 To bLen Step 2
If (Mapp(i) > 0)
ProcedureReturn #True
EndIf
Next
EndIf
EndProcedure
Procedure.l SetToolbarItemText(Toolbar.l, ToolbarItem.l, Text.s, IconSizeX.l)
Protected i.l, hdc.l, hToolbar.l, ButtonInfo.TBBUTTONINFO, Size.SIZE , hFont.l, hFontOld.l
Static FakeButtonStrings.s
If FakeButtonStrings = ""
CompilerIf #PB_Compiler_Unicode
FakeButtonStrings = Space(512)
For i = 1 To 510 Step 2
PokeW(@FakeButtonStrings + i, 0)
Next
PokeW(@FakeButtonStrings + 511, 0)
CompilerElse
FakeButtonStrings = Space(256)
For i = 1 To 255 Step 2
PokeB(@FakeButtonStrings + i, 0)
Next
PokeB(@FakeButtonStrings + 256, 0)
CompilerEndIf
EndIf
hToolbar = ToolBarID(Toolbar)
If hToolbar
ButtonInfo\cbSize = SizeOf(TBBUTTONINFO)
ButtonInfo\dwMask = #TBIF_TEXT | #TBIF_COMMAND |#TBIF_SIZE
ButtonInfo\pszText = @Text
ButtonInfo\idCommand = ToolbarItem
hdc = GetDC_(hToolbar)
If hdc
hFont = SendMessage_(hToolbar, #WM_GETFONT, 0, 0)
hFontOld = SelectObject_(hdc, hFont)
CompilerIf #PB_Compiler_Unicode
If IsUnicode(Text)
GetTextExtentPoint32_(hdc, Text, StringByteLength(Text, #PB_UTF8)/2, @Size)
Else
GetTextExtentPoint32_(hdc, Text, StringByteLength(Text, #PB_UTF8), @Size)
EndIf
CompilerElse
GetTextExtentPoint32_(hdc, Text, StringByteLength(Text, #PB_Ascii), @Size)
CompilerEndIf
ButtonInfo\cx = Size\cx + 10
IconSizeX + 10
If ButtonInfo\cx < IconSizeX
ButtonInfo\cx = IconSizeX
EndIf
SelectObject_(hdc, hFontOld)
ReleaseDC_(hToolbar, hdc)
EndIf
If FakeButtonStrings
SendMessage_(hToolbar, #TB_ADDSTRING, 0, @FakeButtonStrings)
EndIf
SendMessage_(hToolbar, #TB_SETBUTTONINFO, ToolbarItem, @ButtonInfo)
SendMessage_(hToolbar, #TB_AUTOSIZE, 0, 0)
EndIf
EndProcedure
Sorry by bad English.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: PureFORM 1.99 (yet another FORM designer)
It should be fixed.Vitor_Boss® wrote:I found a bug when the toolbar button text use Russian characters, so I wrote a single procedure to check if the string is Unicode.
(It now generates GetTextExtentPoint32_(hdc, Text, Len(Text), @Size), which should be ok for all modes).
PureFORM download updated. (build 406).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).