PureBoard
http://forums.purebasic.com/german/

Module für PureBasic 5.6x
http://forums.purebasic.com/german/viewtopic.php?f=8&t=30383
Seite 4 von 4

Autor:  Thorsten1867 [ 11.02.2019 11:46 ]
Betreff des Beitrags:  Re: Module für PureBasic 5.6x

ScaleGadget.pbi
PB V5.6x
(All OS)

Scaling of all Windows and Gadgets

Code:
  SetScaleGadget(x.f = 1.0, y.f = 1.0, dx.f = 1.0, dy.f = 1.0, Font.f = 0.0)
  SetScaleWindow(x.f = 1.0, y.f = 1.0, dx.f = 1.0, dy.f = 1.0)
  SetScaleFontID(Gadget, FontID)
  SetScaleFontCallback(Gadget, *Callback)

  SetScaleImage(Gadget, ImageID)
  SetScaleMode(Mode)                      ; Set mode for result of position and size from windows and gadgets
  SetScaleModeImage(Mode)                 ; Set mode update of images size
  SetScaleModeFont(Mode)                  ; Set mode update of font size

  GetDynamicScaleX(Window)                ; Returns the current dynamic scaling of ScaleAllGadgets
  GetDynamicScaleY(Window)                ; Returns the current dynamic scaling of ScaleAllGadgets

  ScaleResizeGadget(Gadget, x, y, dx, dy) ; Resize gadget with scaling and dynamic scaling
  ScaleResizeWindow(Window, x, y, dx, dy) ; Resize window
  ScaleAllGadgets(Window, DeltaDY = 0)    ; Scales dynamic all gadgets from the window

  ScaleOpenGadgetList(Gadget, GadgetItem = 0)
  ScaleCloseGadgetList()
  ScaleSetGadgetAttribute(Gadget, Attribute, Value)

  ScaleWindowWidth(Window, Mode = #PB_Window_InnerCoordinate)
  ScaleWindowHeight(Window, Mode = #PB_Window_InnerCoordinate)
  ScaleWindowBounds(Window, MinimumWidth, MinimumHeight, MaximumWidth, MaximumHeight)
  ScaleGadgetX(Gadget, Mode = 0)
  ScaleGadgetY(Gadget, Mode = 0)
  ScaleGadgetWidth(Gadget, Mode = 0)
  ScaleGadgetHeight(Gadget, Mode = 0)

  ScaleCloseWindow(Window)
  ScaleFreeGadget(Gadget)

  ScaleRegisterGadget(Gadget, *Callback = 0, Name.s = "") ; Register your owner draw gadget
  ScaleUnregisterGadget(Gadget)                           ; Unregister your owner draw gadget

  ScaleUpdateGadget(Gadget)

  CreateWindow(Name.s, Window, x, y, InnerWidth, InnerHeight, Title.s, Flags, ParentID)
  CreateGadget(Type, Name.s, Gadget, x, y, dx, dy, Text.s, Param1, Param2, Param3, Flags)

  ParentWindow(Gadget)
  ParentGadget(Gadget)

Autor:  Thorsten1867 [ 04.03.2019 21:52 ]
Betreff des Beitrags:  Re: Module für PureBasic 5.6x

ListExModule.pbi
PB V5.7x
(All OS)

Editierbares & sortierbares List - Gadget

Code:
; ListEx::AddItem()             - similar to 'AddGadgetItem()'
; ListEx::AddColumn()           - similar to 'AddGadgetColumn()'
; ListEx::AddComboBoxItems()    - add items to the comboboxes of the column (items seperated by #LF$)
; ListEx::ClearComboBoxItems()  - clear items of the comboboxes of the column
; ListEx::ClearItems()          - similar to 'ClearGadgetItems()'
; ListEx::DisableEditing()      - disable editing for the complete list
; ListEx::EventColumn()         - column of event (Event: ListEx::#Event_Module)
; ListEx::EventRow()            - row of event    (Event: ListEx::#Event_Module)
; ListEx::EventState()          - returns state   (e.g. CheckBox / DateGadget)
; ListEx::EventValue()          - returns value   (string)
; ListEx::EventID()             - returns row ID or header label
; ListEx::Gadget()              - [#GridLines|#NumberedColumn|#NoRowHeader]
; ListEx::GetAttribute()        - similar to 'GetGadgetAttribute()'
; ListEx::GetCellText()         - similar to 'GetGadgetItemText()' with labels
; ListEx::GetCellState()        - similar to 'GetGadgetItemState()' with labels
; ListEx::GetChangedState()     - check whether entries have been edited
; ListEx::GetColumnAttribute()  - similar to 'GetGadgetItemAttribute()'
; ListEx::GetColumnState()      - similar to 'GetGadgetItemState()' for a specific column
; ListEx::GetItemData()         - similar to 'GetGadgetItemData()'
; ListEx::GetItemID()           - similar to 'GetGadgetItemData()' but with string data
; ListEx::GetItemState()        - similar to 'GetGadgetItemState()'
; ListEx::GetItemText()         - similar to 'GetGadgetItemText()'
; ListEx::Refresh()             - redraw gadget
; ListEx::RemoveColumn()        - similar to 'RemoveGadgetColumn()'
; ListEx::RemoveItem()          - similar to 'RemoveGadgetItem()'
; ListEx::ResetChangedState()   - reset to not edited
; ListEx::SetAutoResizeColumn() - column that is reduced when the vertical scrollbar is displayed.
; ListEx::SetCellState()        - similar to 'SetGadgetItemState()' with labels
; ListEx::SetCellText()         - similar to 'SetGadgetItemText()' with labels
; ListEx::SetColor()            - similar to 'SetGadgetColor()'
; ListEx::SetColumnAttribute()  - [#Align/#Width/#Font]
; ListEx::SetColumnFlag()       - [#Strings/#CheckBoxes/#ComboBoxes/#Buttons]
; ListEx::SetColumnState()      - similar to 'SetGadgetItemState()' for a specific column
; ListEx::SetDateMask()         - similar to 'SetGadgetText()' and 'DateGadget()'
; ListEx::SetDateAttribute()    - similar to 'SetGadgetAttribute()' and 'DateGadget()'
; ListEx::SetFont()             - similar to 'SetGadgetFont()'
; ListEx::SetHeaderAttribute()  - [#Align]
; ListEx::SetHeaderSort()       - enable sort by header column [#Sort_Ascending|#Sort_Descending|#Sort_NoCase|#Sort_SwitchDirection]
; ListEx::SetItemAttribute()    - similar to 'SetGadgetItemAttribute()'
; ListEx::SetItemColor()        - similar to 'SetGadgetItemColor()'
; ListEx::SetItemData()         - similar to 'SetGadgetItemData()'
; ListEx::SetItemFont()         - change font of row or header [#Header]
; ListEx::SetItemID()           - similar to 'SetGadgetItemData()' but with string data
; ListEx::SetItemImage( )       - add a image at row/column
; ListEx::SetItemState()        - similar to 'SetGadgetItemState()'
; ListEx::SetItemText()         - similar to 'SetGadgetItemText()'
; ListEx::SetRowsHeight()       - change height of rows
; ListEx::SetTimeMask()         - change mask for time (sorting)
; ListEx::Sort()                - sort rows by column [#SortString|#SortNumber|#SortFloat|#SortDate|#SortTime|#SortCash / #Deutsch]

Seite 4 von 4 Alle Zeiten sind UTC + 1 Stunde [ Sommerzeit ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/