Differenze tra le versioni di "GridBox"

Da Gambas-it.org - Wikipedia.
(AutoNew)
(Background)
Riga 38: Riga 38:
 
===== Background =====
 
===== Background =====
 
  Property Background As Integer
 
  Property Background As Integer
 +
 +
Imposta il colore di fondo della griglia.
  
 
===== Border =====
 
===== Border =====

Versione delle 14:22, 4 nov 2010

Introduzione

Una GridBox è un componente non ufficiale ma molto valido per chi lavora spesso con i database. Questo componente, tutto made in Gambas-it.org grazie all'ottimo lavoro dell'utente Milio, permette di creare semplicemente una griglia collegata a un database, con pochissime righe di codice, e già pronta con comandi quali: salvataggio, inserimento, eliminazione, modifica.

Una caratteristica interessante di questo componente è la possibilità di mantenere l'integrità dei dati, con l'aiuto di oggetti quali TextBox, ComboBox, CheckBox, ValueBox, ecc, per una corretta modifica/inserimento di record nel DataBase. Altre caratteristiche sono la formattazione dei dati, mantenendo l'integrità del loro valore, formattazioni condizionate in stile foglio di calcolo, colonne di tipo Formula per facilitare calcoli su i vari record, e altro ancora.

Le Classi esportabili

In questo componente abbiamo i seguenti oggetti che si possono utilizzare:

  • GridBox
  • Grid
  • Conditional
  • Cell

Simboli dell'oggetto GridBox

Proprietà

Action
Property Action As String
AlwaysEditable
Property AlwaysEditable As Boolean

Imposta la griglia in modo che le celle siano sempre editabili. Usando il Tab o le frecce, il focus verrà spostato solo sulle celle che hanno la proprietà ReadOnly impostata a False.

AutoDataType
Property AutoDataType As Boolean

Imposta in automatico la proprietà DataType delle colonne di tipo Field in base al tipo di dato passatogli dal metodo LoadData.

AutoNew
Property AutoNew As Boolean

Questa proprietà, legata alla proprietà AlwaysEditable, fa in modo che, spostandosi dall'ultima cella editabile dell'ultima riga della griglia, crei in automatico una nuova riga per l'inserimento di un nuovo record.

Background
Property Background As Integer

Imposta il colore di fondo della griglia.

Border
Property Border As Integer
Busy
Property Busy As Boolean
Children
Property Read Children As .ContainerChildren
ClientH
Property Read ClientH As Integer
ClientHeight
Property Read ClientHeight As Integer
ClientW
Property Read ClientW As Integer
ClientWidth
Property Read ClientWidth As Integer
ClientX
Property Read ClientX As Integer
ClientY
Property Read ClientY As Integer
Color
Property Read Color As Color (Virtual class)
ColorRowAlternating
Property ColorRowAlternating As Boolean
Column
Property Column As Integer
Columns
Property Read Columns As Columns (Virtual class)
Connection
Property Connection As Connection
Cursor
Property Cursor As Cursor
DataMining
Property DataMining As Boolean
Design
Property Design As Boolean
Drop
Property Drop As Boolean
Enabled
Property Enabled As Boolean
Expand
Property Expand As Boolean
FieldKey
Property FieldKey As String[]
FieldReordering
Property FieldReordering As String
Font
Property Font As Font
Foreground
Property Foreground As Integer
GridOnly
Property GridOnly As Boolean
H
Property H As Integer
Handle
Property Read Handle As Integer
HasFocus
Property Read HasFocus As Boolean
Header
Property Header As Integer
Height
Property Height As Integer
Hovered
Property Read Hovered As Boolean
Id
Property Read Id As Integer
Ignore
Property Ignore As Boolean
KeyActivity
Property KeyActivity As Boolean
KeyGrid
Property Read KeyGrid As KeyGrid (Virtual class)
Left
Property Left As Integer
Mouse
Property Mouse As Integer
Name
Property Name As String
Next
Property Next As Control
Parent
Property Read Parent As Container
PicCheck
Property PicCheck As Picture
PicUncheck
Property PicUncheck As Picture
PopupMenu
Property PopupMenu As String
Previous
Property Previous As Control
Query
Property Read Query As String[]
ReadData
Property Read ReadData As Result
ReadOnly
Property ReadOnly As Boolean
Row
Property Row As Integer
RowSelected
Property RowSelected As Integer[]
Rows
Property Read Rows As Rows (Virtual class)
ScreenX
Property Read ScreenX As Integer
ScreenY
Property Read ScreenY As Integer
ScrollBar
Property ScrollBar As Integer
ScrollX
Property ScrollX As Integer
ScrollY
Property ScrollY As Integer
Table
Property Read Table As Table
TableName
Property TableName As String
Tag
Property Tag As Variant
TmpConnection
Property Read TmpConnection As Connection
Tooltip
Property Tooltip As String
Top
Property Top As Integer
Tracking
Property Tracking As Boolean
UpdateReording
Property UpdateReording As Boolean
Visible
Property Visible As Boolean
W
Property W As Integer
Width
Property Width As Integer
Window
Property Read Window As Window
X
Property X As Integer
Y
Property Y As Integer

Metodi

Eventi

Link utili