[Gambas-user] event keypress
John Dizaro
jedsoftware at ...626...
Tue Jan 22 17:10:52 CET 2008
FUNCTION TRAZ_CARROS() AS Boolean
DIM S_SQL AS String
DIM LINHA AS Integer
LINHA = 0
M01BANCO.ABRIR_CONECXAO()
GV_t07_carro.Clear
GV_t07_carro.Refresh
S_SQL = "SELECT t07_ano_fabricacao, t07_placa_detran, t07_conceccao, " &
" t07_num_seq_carro, t17_desc_carro " &
" FROM t07_carro, t17_marca " &
" WHERE upper(t07_placa_detran) LIKE '%" &
UCase(TB_t07_placa_detran.Text) & "%'" &
" AND t17_cd_marca = t07_cd_marca " &
" ORDER BY t07_ano_fabricacao, t07_placa_detran, t07_conceccao;"
PRINT S_SQL
RES_t07 = M01BANCO.Gl_Conn.Exec(S_SQL)
GV_t07_carro.Columns.Count = 5
'GridView1.Rows.Count = 3
'GV_t07_carro.Columns.Width = 52
'GridView1.Rows[1].Height = 20
'GV_t07_carro.Columns.Resizable
GV_t07_carro.Columns[0].Width = 40
GV_t07_carro.Columns[1].Width = 70
GV_t07_carro.Columns[2].Width = 70
GV_t07_carro.Columns[3].Width = 0
GV_t07_carro.Columns[4].Width = 10
GV_t07_carro.Columns[0].Title = "Ano"
GV_t07_carro.Columns[1].Title = "Placa"
GV_t07_carro.Columns[2].Title = "Conc"
'GV_t07_carro.Columns[3].Title = "Nº Reg"
GV_t07_carro.Columns[4].Title = "Marca"
IF RES_t07.Count > 0 THEN
GV_t07_carro.Rows.Count = RES_t07.Count
LINHA = 0
FOR EACH RES_t07
GV_t07_carro[LINHA, 0].Text = RES_t07!t07_ano_fabricacao
GV_t07_carro[LINHA, 1].Text = RES_t07!t07_placa_detran
GV_t07_carro[LINHA, 2].Text = RES_t07!t07_conceccao
GV_t07_carro[LINHA, 3].Text = RES_t07!t07_num_seq_carro
GV_t07_carro[LINHA, 4].Text = RES_t07!t17_desc_carro
LINHA = LINHA + 1
RES_t07.MoveNext
NEXT
ENDIF
IF RES_t07.Available = TRUE THEN
RES_t07.Connection.Close
ENDIF
RETURN TRUE
CATCH
IF RES_t07.Available = TRUE THEN
RES_t07.Connection.Close
ENDIF
Message.Error("ERRO:" & Error.Code & " DESCRIÇÃO:" & Error.Text)
RETURN FALSE
END
2008/1/11, Arief Bayu Purwanto <ariefbayu at ...626...>:
>
> On 1/11/08, gunartha.nyoman <gunartha.nyoman at ...1817...> wrote:
> >
> > hi all,
> >
> > I am trying to use gambas. Please help me about code to resolve my
> problem
> > 1. How to move cursor when I press key enter on keyboard ?
>
>
> Did you mean change focus to another object? if so, set it to
> <ObjectName>.SetFocus().
>
> in your <ObjectName>_KyePress()
>
> IF Key.Code = key.Return THEN
> <AnotherObject>.SetFocus()
> END IF
>
> 2. How to fill data from database (as a postgres database server) to
> > gridview
> > or table view. ?
> >
> > Regards
> > Gunartha
> >
> Greeting from Indonesia too :D.
>
> --
> Daiguren Hyōrinmaru<
> http://en.wikipedia.org/wiki/Toshiro_Hitsugaya#Hy.C5.8Drinmaru>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
>
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
John Evan Dizaro
JED Desensolvimento de Software - Windows e Linux
O software do jeito que você precisa
Fone: (41) 3334-3001
Fone: (41) 9244-4603
Rua: Chile, 2211 Bebouças Curitiba - PR - Brasil
More information about the User
mailing list