Differenze tra le versioni di "GridBox"

Da Gambas-it.org - Wikipedia.
(Busy)
Riga 17: Riga 17:
  
 
==== Proprietà ====
 
==== Proprietà ====
===== Action =====
 
Property Action As String
 
  
 
===== AlwaysEditable =====
 
===== AlwaysEditable =====
Riga 35: Riga 33:
  
 
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.
 
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 =====
 
===== Busy =====
Riga 59: Riga 49:
 
   
 
   
 
  End
 
  End
 
===== 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 =====
 
===== Color =====
Riga 95: Riga 64:
 
===== Connection =====
 
===== Connection =====
 
  Property Connection As Connection
 
  Property Connection As Connection
 
===== Cursor =====
 
Property Cursor As Cursor
 
  
 
===== DataMining =====
 
===== DataMining =====
 
  Property DataMining As Boolean
 
  Property DataMining As Boolean
 
===== Design =====
 
Property Design As Boolean
 
 
===== Drop =====
 
Property Drop As Boolean
 
  
 
===== Enabled =====
 
===== Enabled =====
Riga 119: Riga 79:
 
===== FieldReordering =====
 
===== FieldReordering =====
 
  Property FieldReordering As String
 
  Property FieldReordering As String
 
===== Font =====
 
Property Font As Font
 
 
===== Foreground =====
 
Property Foreground As Integer
 
  
 
===== GridOnly =====
 
===== GridOnly =====
 
  Property GridOnly As Boolean
 
  Property GridOnly As Boolean
 
===== H =====
 
Property H As Integer
 
 
===== Handle =====
 
Property Read Handle As Integer
 
 
===== HasFocus =====
 
Property Read HasFocus As Boolean
 
  
 
===== Header =====
 
===== Header =====
 
  Property Header As Integer
 
  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 =====
 
===== KeyActivity =====
Riga 158: Riga 91:
 
===== KeyGrid =====
 
===== KeyGrid =====
 
  Property Read KeyGrid As KeyGrid (Virtual class)
 
  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 =====
 
===== PicCheck =====
Riga 260: Riga 178:
 
===== Y =====
 
===== Y =====
 
  Property Y As Integer
 
  Property Y As Integer
 +
 +
Action - Background - Border - Children - ClientH - ClientHeight - ClientW - ClientWidth - ClientX - ClientY - Cursor - Design - Drop - Font - Foreground - H - Handle - HasFocus - Height - Hovered - Id - Ignore - Left - Mouse - Name - Next - Parent -
  
 
==== Metodi ====
 
==== Metodi ====

Versione delle 17:00, 5 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à

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.

Busy
Property Busy As Boolean

Questa proprietà serve a impostare la griglia in una fase di attesa. Ritorna utile quando la query da caricare è molto pesante.

Un esempio di utilizzo potrebbe essere questo:

Public Sub Caricodati()
  
  With Me.GridBox1
    .Busy = True
    .LoadData(<Query>)
    .Busy = False
  End With

End
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
DataMining
Property DataMining As Boolean
Enabled
Property Enabled As Boolean
Expand
Property Expand As Boolean
FieldKey
Property FieldKey As String[]
FieldReordering
Property FieldReordering As String
GridOnly
Property GridOnly As Boolean
Header
Property Header As Integer
KeyActivity
Property KeyActivity As Boolean
KeyGrid
Property Read KeyGrid As KeyGrid (Virtual class)
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

Action - Background - Border - Children - ClientH - ClientHeight - ClientW - ClientWidth - ClientX - ClientY - Cursor - Design - Drop - Font - Foreground - H - Handle - HasFocus - Height - Hovered - Id - Ignore - Left - Mouse - Name - Next - Parent -

Metodi

Eventi

Link utili