46
Domande tecniche / Re: Mi aiutate ad installare gambas 3 su opensuse 11.4?
« il: 26 Aprile 2011, 18:10:59 »
E mo come faccio!?!
19/05/2023: A causa di un errore sono stati cancellati, insieme ad account creati da bot, alcuni account legittimi. Si prega di leggere qui: https://www.gambas-it.org/smf/index.php?topic=9733.0
Questa sezione ti permette di visualizzare tutti i post inviati da questo utente. N.B: puoi vedere solo i post relativi alle aree dove hai l'accesso.
Public Sub Button2_Click()
Dim hDraw As New DrawingArea(FMain.ScrollView1)
Dim hButton As New ToolButton(FMain.ScrollView1)
hDraw.Width = 80
hDraw.Height = 80
hDraw.Top = 5
hDraw.Left = 5
hDraw.Background = Color.Black
hButton.Width = 20
hButton.Height = 20
hButton.Top = hDraw.Height + 5
hButton.Left = hDraw.Left
hButton.Text = "P"
Me.Close
End
Dim hPatch As String
hPatch = FileChooser1.SelectedPath
Public a As Integer
Public b As Integer
Public Sub _new()
End
Public Sub Form_Open()
Me.Center
End
Public Sub ToolButton1_Click()
Paint.Begin(DrawingArea1)
Paint.Brush = Paint.Color(ColorChooser1.SelectedColor)
Paint.Font.Name = FontChooser1.SelectedFont
Paint.Text("Hello!", a, b)
Paint.Fill
Paint.End
End
Public Sub DrawingArea1_MouseMove()
a = Mouse.X
b = Mouse.Y
ValueBox1.Value = a
ValueBox2.Value = b
End
il codice che hai inserito a me funziona , anche se non ci metterei proprio l' ultima riga:a me noCodice: [Seleziona]non ti serve fare un refresch della drawing, l' hai già disegnata nel codice primaDrawingArea1.Refresh
il nome lo devi idicare prima dell' istruzione testo
per disegnare solo al clic del mouse devi inserire il codice di disegno nella funzione del pulsente e non in "Public Sub DrawingArea1_Draw()"
le diversita tra paint e draw sono molte.. una per tutte la possibilità di gestire le trasparenze e i file svg , non saprei dirti se è vettoriale ...
warning: unable to load Qt translation: it_IT.utf8
QPainter::begin: Widget painting can only begin as a result of a paintEvent
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::font: Painter not active
QPainter::setFont: Painter not active
QPainter::setBrush: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::fontMetrics: Painter not active
QPainter::font: Painter not active
QPainter::brush: Painter not active
QPainter::fillPath: Painter not active
Public Sub ToolButton1_Click()
Dim x, y As Integer
x = 150
y = 150
Paint.Begin(DrawingArea1)
Paint.Font.Name = FontChooser1.SelectedFont
Paint.Brush = Paint.Color(Color.Blue)
Paint.Text("Hello!", x, y)
Paint.Fill
Paint.End
DrawingArea1.Refresh
End
Public Sub ToolButton1_Click()
DrawingArea1.Refresh
End
Public Sub DrawingArea1_Draw()
Dim x, y As Integer
x = 150
y = 150
Paint.Begin(DrawingArea1)
Paint.Brush = Paint.Color(Color.DarkBlue)
Paint.Text("Hello!", x, y)
Paint.Font.Name = FontChooser1.SelectedFont
Paint.Fill
Paint.End
End