animated gif - how to?
Hey there,
did anyone ever succeed in showing an animated .gif in a Label or other usercontrol?
Does anyone have an idea how to do that?
Dani

Edit:
I just found this post stating that a PictureBox does what I am looking for. My PictureBox does not play the animated .gif above! Is there any special format/ framerate, etc. required?
Edit2:
Hey, and don't tell me to use the progressbar!!
did anyone ever succeed in showing an animated .gif in a Label or other usercontrol?
Does anyone have an idea how to do that?
Dani
Edit:
I just found this post stating that a PictureBox does what I am looking for. My PictureBox does not play the animated .gif above! Is there any special format/ framerate, etc. required?
Edit2:
Hey, and don't tell me to use the progressbar!!
This post has been edited 2 times, last edit by "Dani" (Oct 22nd 2011, 9:24pm)
Ypu need to use a Java-way in this case, too.
If your gif is called "loading.gif", then load it to your resources and create a Usercontrol with
In the uploaded file I have already done it.
If your gif is called "loading.gif", then load it to your resources and create a Usercontrol with
|
|
Jabaco Source |
1 2 3 4 5 6 7 |
Public Sub Usercontrol_Initialize() Dim myIcon As javax#swing#ImageIcon myIcon = New javax#swing#ImageIcon(getClass.getResource("res/loading.gif")) Dim myPic As javax#swing#JLabel = New javax#swing#JLabel(myIcon) myPic.setBounds(0,0,105,16) Me.add(myPic) End Sub |
In the uploaded file I have already done it.
Thanks again theuserbl,
very nice example. Opened my eyes about a couple of other issues as well!!
It is not that easy to allways come up with the according java syntax.
Still I am glad Jabaco is this flexible.
Um den Bogen noch etwas weiter zu spannen:
How would I add an image (not animated) to a JBgrid cell?
Dani
very nice example. Opened my eyes about a couple of other issues as well!!
It is not that easy to allways come up with the according java syntax.
Still I am glad Jabaco is this flexible.
Um den Bogen noch etwas weiter zu spannen:
How would I add an image (not animated) to a JBgrid cell?
Dani
Thank You,
I experimented a little bit with this. Thanks to you inspiration a came up with a direct way.
SamplePng needs to be present in your '/Res' directory.
I was also looking at:
but I can not add more than one item to the cbo list and it appears in every cell of the JBGrid1.
Other issues with the JBGrid would be invoking a checkbox, the JBGrid1.CellButton and maybe a colSortIndicator in the header (independent from autosort!). I did not look at those yet though.
Dani
I experimented a little bit with this. Thanks to you inspiration a came up with a direct way.
SamplePng needs to be present in your '/Res' directory.
|
|
Jabaco Source |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Public Sub Form_Load() JBGrid1.Cols = 2 JBGrid1.Rows = 2 JBGrid1.Header(0) = "Pictures" 'needs to be adressed JBGrid1.TextMatrix(0, 0) = "" JBGrid1.DataMatrix(0,0).Icon = SamplePng JBGrid1.Parent.setRowHeight(80) End Sub |
I was also looking at:
|
|
Jabaco Source |
1 2 |
JBGrid1.Editable = jbEditOnClick
JBGrid1.ComboList = "Hallo"
|
but I can not add more than one item to the cbo list and it appears in every cell of the JBGrid1.
Other issues with the JBGrid would be invoking a checkbox, the JBGrid1.CellButton and maybe a colSortIndicator in the header (independent from autosort!). I did not look at those yet though.
Dani
Haven't looked particularly at it.but I can not add more than one item to the cbo list and it appears in every cell of the JBGrid1.
But possibly this side could help you:
[ http://www.jabaco.org/wiki/ComboBox ]
Greatings
theuserbl
Similar threads
-
General topics, questions and discussions »-
Widget for animation play?
(Sep 3rd 2011, 6:04am)
