Page 4 of 4
Re: [Module] PureBasic V5.7x (DPI)
Posted: Fri Dec 20, 2019 4:20 pm
by Thorsten1867
ComboBoxEx Gadget - Module (all OS / DPI / 64Bit)
___
Code: Select all
; ComboBoxEx::AddItem() - similar to 'AddGadgetItem()'
; ComboBoxEx::AttachPopupMenu() - attach a popup menu to the list
; ComboBoxEx::Copy() - copy selection to clipboard
; ComboBoxEx::Cut() - cut selection to clipboard
; ComboBoxEx::Delete() - delete selection
; ComboBoxEx::ClearItems() - similar to 'ClearGadgetItems()'
; ComboBoxEx::CountItems() - similar to 'CountGadgetItems()'
; ComboBoxEx::Disable() - similar to 'DisableGadget()'
; ComboBoxEx::GetData() - similar to 'GetGadgetData()'
; ComboBoxEx::GetID() - similar to 'GetGadgetData()', but string instead of quad
; ComboBoxEx::GetColor() - similar to 'GetGadgetColor()'
; ComboBoxEx::GetItemData() - similar to 'GetGadgetItemData()'
; ComboBoxEx::GetItemLabel() - similar to 'GetGadgetItemData()', but string instead of quad
; ComboBoxEx::GetItemText() - similar to 'GetGadgetItemText()'
; ComboBoxEx::GetLabelText() - similar to 'GetGadgetItemText()', but label instead of row
; ComboBoxEx::GetState() - similar to 'GetGadgetState()'
; ComboBoxEx::GetText() - similar to 'GetGadgetText()'
; ComboBoxEx::Gadget() - similar to 'ComboBoxGadget()'
; ComboBoxEx::Hide() - similar to 'HideGadget()'
; ComboBoxEx::Paste() - paste clipboard
; ComboBoxEx::RemoveItem() - similar to 'RemoveGadgetItem()'
; ComboBoxEx::SetAttribute() - similar to 'SetGadgetAttribute()'
; ComboBoxEx::SetAutoResizeFlags() - [#MoveX|#MoveY|#Width|#Height]
; ComboBoxEx::SetColor() - similar to 'SetGadgetColor()'
; ComboBoxEx::SetData() - similar to 'SetGadgetData()'
; ComboBoxEx::SetFont() - similar to 'SetGadgetFont()'
; ComboBoxEx::SetID() - similar to 'SetGadgetData()', but string instead of quad
; ComboBoxEx::SetImage() - replace the arrow with an image
; ComboBoxEx::SetItemColor() - similar to 'SetGadgetItemColor()'
; ComboBoxEx::SetItemData() - similar to 'SetGadgetItemData()'
; ComboBoxEx::SetItemImage() - similar to 'SetGadgetItemImage()'
; ComboBoxEx::SetItemText() - similar to 'SetGadgetItemText()'
; ComboBoxEx::SetLabelText() - similar to 'SetGadgetItemText()', but label instead of row
; ComboBoxEx::SetState() - similar to 'SetGadgetState()'
; ComboBoxEx::SetText() - similar to 'SetGadgetText()'
Download: ComboBoxExModule.pbi
Re: [Module] PureBasic V5.7x (DPI)
Posted: Fri Dec 20, 2019 4:22 pm
by Thorsten1867
SwitchGadget - Module (all OS / DPI / 64Bit)
Code: Select all
;{ _____ Switch - Commands _____
; Switch::Gadget() - similar to 'ButtonGadget()'
; Switch::GetData() - similar to 'GetGadgetData()'
; Switch::GetID() - similar to 'GetGadgetData()', but it uses a string
; Switch::GetState() - similar to 'GetGadgetState()'
; Switch::Hide() - similar to 'HideGadget()'
; Switch::SetAutoResizeFlags() - [#MoveX|#MoveY|#Width|#Height]
; Switch::SetAttribute() - similar to 'SetGadgetAttribute()'
; Switch::SetColor() - similar to 'SetGadgetColor()'
; Switch::SetData() - similar to 'SetGadgetData()'
; Switch::SetFont() - similar to 'SetGadgetFont()'
; Switch::SetID() - similar to 'SetGadgetData()', but it uses a string
; Switch::SetState() - similar to 'SetGadgetState()'
;}
Download: SwitchModule.pbi
Re: [Module] PureBasic V5.7x (DPI)
Posted: Fri Dec 20, 2019 4:25 pm
by Thorsten1867
TreeEx Gadget - Module (all OS / DPI / 64Bit)
Tree Gadget with additional columns
Code: Select all
; TreeEx::AddColumn() - similar to 'AddGadgetColumn()'
; TreeEx::AddItem() - similar to 'AddGadgetItem()'
; TreeEx::ClearItems() - similar to 'ClearGadgetItems()'
; TreeEx::CountItems() - similar to 'CountGadgetItems()'
; TreeEx::DisableReDraw() - disable redraw
; TreeEx::Gadget() - similar to 'TreeGadget()'
; TreeEx::GetItemColor() - similar to 'GetGadgetItemColor()'
; TreeEx::GetItemData() - similar to 'GetGadgetItemData()'
; TreeEx::GetItemState() - similar to 'GetGadgetItemState()'
; TreeEx::GetItemText() - similar to 'GetGadgetItemText()'
; TreeEx::GetLabelState() - similar to 'GetGadgetItemState()', but label instead of column
; TreeEx::GetLabelText() - similar to 'GetGadgetItemText()', but label instead of column
; TreeEx::GetState() - similar to 'GetGadgetState()'
; TreeEx::Hide() - similar to 'HideGadget()'
; TreeEx::RemoveItem() - similar to 'RemoveGadgetItem()'
; TreeEx::SaveColorTheme() - save a custom color theme
; TreeEx::SetAutoResizeColumn() - column that is reduced when the vertical scrollbar is displayed.
; TreeEx::SetAutoResizeFlags() - [#MoveX|#MoveY|#Width|#Height]
; TreeEx::SetColor() - similar to 'SetGadgetColor()'
; TreeEx::SetColorTheme() - set or load a color theme
; TreeEx::SetFont() - similar to 'SetGadgetFont()'
; TreeEx::SetHeaderAttribute() - set header attribute (e.g. align)
; TreeEx::SetHeaderFont() - set header font
; TreeEx::SetItemColor() - similar to 'SetGadgetItemColor()'
; TreeEx::SetItemData() - similar to 'SetGadgetItemData()'
; TreeEx::SetItemImage() - similar to 'SetGadgetItemImage()'
; TreeEx::SetItemState() - similar to 'SetGadgetItemState()'
; TreeEx::SetItemText() - similar to 'SetGadgetItemText()'
; TreeEx::SetLabelState() - similar to 'SetGadgetItemState()', but label instead of column
; TreeEx::SetLabelText() - similar to 'SetGadgetItemText()', but label instead of column
; TreeEx::SetState() - similar to 'SetGadgetState()'
Download: TreeExModule.pbi
Re: [Module] PureBasic V5.7x (DPI)
Posted: Fri Dec 20, 2019 4:31 pm
by Thorsten1867
MessageExRequester - Module (all OS / DPI / 64Bit)
Code: Select all
; MessageEx::Create() - create a message requester style
; MessageEx::Requester() - similar to 'MessageRequester()'
; MessageEx::SetAttribute() - change attributte
; MessageEx::SetColor() - change default colors
; MessageEx::SetFont() - change default font
; MessageEx::SetImage() - set your own image (style)
; MessageEx::SetItemColor() - set the color of a row (style)
; MessageEx::SetItemFont() - set the font of a row (style)
; MessageEx::SetItemFlags() - set the align of a row (style)
Download: MessageExModule.pbi
Re: [Module] PureBasic V5.7x (DPI)
Posted: Mon Mar 02, 2020 2:59 pm
by Thorsten1867
MarkDown Gadget & Requester - Module (all OS / 64Bit / DPI)
Display or convert text in MarkDown syntax
- Export gadget content to HTML or PDF
- Convert text from MarkDown to HTML or PDF.
Code: Select all
### MarkDown ###
The gadget can display text formatted with the [MarkDown Syntax](https://www.markdownguide.org/basic-syntax/).
Markdown[^1] is a lightweight MarkDown language that you can use to add formatting elements to plaintext text documents.
- Markdown files can be read even if it isn’t rendered.
- Markdown is portable.
- Markdown is platform independent.
[^1]: Created by John Gruber in 2004.
Download: MarkDownModule.pbi
Re: [Module] PureBasic V5.7x (DPI)
Posted: Mon Mar 02, 2020 3:08 pm
by Thorsten1867
ScrollBarEx - Module (all OS / DPI / 64Bit)
- Adjust scrollbar length if vertical and horizontal are displayed
- Support of the mouse wheel when the cursor is over the scrollbar
- Automatic size adjustment
- Appearance customization
- Support for rounded corners
- Full color support
Code: Select all
; ScrollEx::Gadget() - similar to ScrollBarGadget()
; ScrollEx::GetAttribute() - similar to GetGadgetAttribute()
; ScrollEx::GetData() - similar to GetGadgetData()
; ScrollEx::GetID() - similar to GetGadgetData(), but string instead of integer
; ScrollEx::GetState() - similar to GetGadgetState()
; ScrollEx::Hide() - similar to HideGadget()
; ScrollEx::SetAttribute() - similar to SetGadgetAttribute()
; ScrollEx::SetColor() - similar to SetGadgetColor()
; ScrollEx::SetData() - similar to SetGadgetData()
; ScrollEx::SetID() - similar to SetGadgetData() , but string instead of integer
; ScrollEx::SetState() - similar to SetGadgetState()
Download: ScrollBarExModule.pbi
Re: [Module] PureBasic V5.7x (DPI)
Posted: Sun May 22, 2022 10:50 am
by Thorsten1867
Barcode - Module (all OS / DPI / 64Bit)
- Supports UPC-A and Code-39 Barcodes
- Automatic size adjustment
- Full color support
Code: Select all
; BarCode::Gadget() - Gadget to display barcodes
; BarCode::GetText() - similar to 'GetGadgetText()'
; BarCode::GetColor() - similar to 'GetGadgetColor()'
; BarCode::Hide() - similar to 'HideGadget()'
; BarCode::SetAutoResizeFlags() - [#MoveX|#MoveY|#Width|#Height]
; BarCode::SetColor() - similar to 'SetGadgetColor()'
; BarCode::SetText() - similar to 'SetGadgetText()'
Re: [Module] PureBasic V5.7x (DPI)
Posted: Sun May 22, 2022 10:57 am
by Thorsten1867
QRCode - Module (all OS / DPI / 64Bit)
- Gadget to display QRCodes
- Automatic size adjustment
- Full color support
- Create QRCodes (image)
- Decode QRCodes (image)
Code: Select all
; ----- Image -----
; QRCode::Create() - Create an image with the QRCode
; QRCode::SetDefaults() - Change defaults for Create()
; ----- Gadget -----
; QRCode::Gadget() - Gadget for QRCodes
; QRCode::GetText() - similar to 'GetGadgetText()'
; QRCode::GetColor() - similar to 'GetGadgetColor()'
; QRCode::SetAutoResizeFlags() - [#MoveX|#MoveY|#Width|#Height]
; QRCode::SetAttribute() - similar to 'SetGadgetAttribute()'
; QRCode::SetColor() - similar to 'SetGadgetColor()'
; QRCode::SetText() - similar to 'SetGadgetText()'
; ----- Decode -----
; QRCode::Decode() - decodes an image with QRCode
Re: [Module] PureBasic V5.7x (DPI)
Posted: Sat Nov 25, 2023 7:48 am
by Luca Concon
Thanks very usefull !
Re: [Module] PureBasic V5.7x (DPI)
Posted: Sun Jun 02, 2024 1:45 pm
by hoangdiemtinh
Thank @Thorsten1867.
I searched for a thousand years and now I found the wonderful Module.
Re: [Module] PureBasic V5.7x (DPI)
Posted: Fri Jun 20, 2025 1:47 pm
by drgolf
Hello,
I have a problem with Preview module :
On windows 10 x64, with PB 6.21.
Launch previewmodule.pbi with :
Code: Select all
CompilerIf #PB_Compiler_IsMainFile
#Example = 3
Then move the horizontal scrollbar in the window preview and the exe crash :
Code: Select all
[14 :40 :16] Attente du démarrage du programme...
[14 :40 :16] Type d'exécutable: Windows - x64 (64bit, Unicode)
[14 :40 :16] Exécutable démarré.
[14 :40 :24] [ERREUR] PreviewModule.pbi (Ligne: 806)
[14 :40 :24] [ERREUR] Accès mémoire invalide. (erreur d'écriture à l'adresse 2161809154048)
[14 :40 :58] Le programme a été arrêté.
Any help appreciated...
Re: [Module] PureBasic V5.7x (DPI)
Posted: Mon Jun 23, 2025 7:13 pm
by HeX0R
The problem is, with PB6.21 DrawText() seems to freak out, as soon as the result get negative (which means, the whole text would be "drawn" outside the output).
Example:
Code: Select all
If CreateImage(0, 200, 200) And StartDrawing(ImageOutput(0))
Debug DrawText(-17, Random(200), "B!", $123456)
StopDrawing()
EndIf
The text width of "B!" is (in my system) 17, so DrawText() will return 0.0. Depending on your standard font, you might have to change the -17.
But as soon as you try to write more to the left (which is what the Preview thing is doing), it crashes.
Just replace -17 by -18, result would be -1, but in PB6.21 it crashes, whereas older versions have no problem.
I'd consider this to be a bug, even if it is now forbidden to draw outside of the Output (don't think so?), but it should not lead to an IMA or a crash.
A workaround for now could be:
Code: Select all
CompilerIf #PB_Compiler_Version = 621
Procedure DrawText_(x.d, y.d, Text$, Color)
Protected TextWidth
TextWidth = TextWidth(Text$)
If x + TextWidth < 0
ProcedureReturn x + TextWidth
EndIf
ProcedureReturn DrawText(x, y, Text$, Color)
EndProcedure
Macro DrawText(a, b, c, d)
DrawText_(a, b, c, d)
EndMacro
CompilerEndIf
Just paste it under EnableExplicit
Re: [Module] PureBasic V5.7x (DPI)
Posted: Mon Jun 23, 2025 9:06 pm
by mk-soft
Is a bug on Windows. With PB v6.20 it still works with the correct return from the new x position.
On macOS and Linux the result is Ok
Bug Report:
viewtopic.php?t=87121