Coder Social home page Coder Social logo

gjhcustomcomponents's Introduction

GJHCustomComponents

A set of custom components and classes for Lazarus:

  • TGJHTickBox : RISC OS style tick box
  • TGJHRadioBox : RISC OS style radio (option) box
  • TGJHSlider : Coloured slider with title and value
  • TGJHButton : RISC OS style buttons
  • TGJHRegistry : Wrapper around the TRegistry class
I have written these to serve my own purposes, but are here for others to use. I will likely add to them, and update them over time.
Utilising these means not having to install packages and recompile Lazarus.

Usage

TGJHTickBox and TGJHRadioBox

Methods
Create(AOwner)
Creates the control. Pass the owner control as the only parameter.

Events
OnChange
Fires when the control changes state.

Properties
In addtion to what is inherited from TGraphicControl, including Top, Left, Visible, Parent, Name and Font.
Caption: String
Text displayed next to the box.
Colour: TColor
Background colour. Default: clNone.
Group: Integer
(RadioBox only) Allows controls to be grouped together, and have several different groups of radio controls with the same parent.
OnlyMouse: Boolean
Only fire the OnChange event when clicked on. Default: False.
Ticked: Boolean
Ticked or not. Default: False.

TGJHSlider

Methods
Create(AOwner)
Creates the control. Pass the owner control as the only parameter.

Events
OnChange
Fires when the position changes.

Properties
In addtion to what is inherited from TGraphicControl, including Top, Left, Width, Height, Visible, Parent, Name and Font.
BackColour: TColor
Background colour of the actual slider (not the surrounding area). Has no effect if Transparent is True. Default: clWhite.
Border3D: Boolean
Display a RISC OS style 3D border around the entire control. Default: False.
Caption: String
Text displayed top or right of the slider.
Colour: TColor
Colour of the slider. Default: clRed.
FillSlider: Boolean
Whether to fill the slider or just to the position. Default: False.
Gradient: Boolean
Whether to fade the colour to black at lowest position or a solid colour. Default: False.
HexValue: Boolean
Display the position as hex. Default: False.
Max: Integer
Maximum the position can be. Default: 100.
Min: Integer
Minimum the position can be. Default: 0.
Orientation: Integer
Orientation of the slider - csVertical or csHorizontal. Default: csVertical.
Outline: String
Whether, and where, to display a 2D black border. Does not affect the 3D border settings. Default: csOutOuter.
csOutNone : No borders
csOutInner: Border around the actual slider position
csOutOuter: Border around the actual slider entirity
csOutBoth: Both of the above
Pointers: Boolean
Whether to show pointers either side of the slider. Default: True.
Position: Integer
Position of the slider (i.e., the value). Default: 0.
ShowValue: Boolean
Show the value on the bottom/left of the slider. Default: False.
Step: Integer
Step size between positions. Default: 1.
Suffix: String
Text displayed after the value, if shown.
Transparent: Boolean
Whether the actual slider is transparent or use BackColour. Default: True.

TGJHButton

Methods
Create(AOwner)
Creates the control. Pass the owner control as the only parameter.

Events
OnClick
Fires when the control is clicked on.

Properties
In addtion to what is inherited from TGraphicControl, including Top, Left, Visible, Parent, Name and Font.
Caption: String
Text displayed on the button.
Default: Boolean
Specifys that the button is a default button (has the yellow inset border). Default: False.
ModalResult: TModalResult
Modal result to be passed to the form. Default: mrNone.

TGJHRegistry

This is not a visual control.
Methods
Create(LKey: String)
Creates the instance. Pass the registry key as the only parameter.
DeleteKey(LKey: String)
Deletes the entry from the registry.
DoesKeyExist(V: String): Boolean
Returns whether the registry entry V exists.
GetRegValA(V: String; var D: array of Byte)
Gets an array of bytes from the registry entry held in V and stores it in D.
GetRegValB(V: String; D: Boolean): Boolean
Gets a boolean from the registry entry held in V. If the entry does not exist it is created with a default value held in D.
GetRegValI(V: String; D: Integer): Integer
Gets an integer from the registry entry held in V. If the entry does not exist it is created with a default value held in D.
GetRegValS(V: String; D: String): String
Gets a string from the registry entry held in V. If the entry does not exist it is created with a default value held in D.
SetRegValA(V: String; var D: array of Byte)
Sets an array of bytes held in D in the registry entry held in V.
SetRegValB(V: String; D: Boolean)
Sets a boolean held in D in the registry entry held in V.
SetRegValI(V: String; D: Integer)
Sets an integer held in D in the registry entry held in V.
SetRegValS(V: String; D: String)
Sets a string held in D in the registry entry held in V.

Properties
Key: String
The registry key being used (read only).

gjhcustomcomponents's People

Contributors

geraldholdsworth avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.