Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Vassilis K
Dimitri I changed it to your proposed option and I get : "Result is not available" error at line: SELECT CASE rsThesi!thesi I do not know why it doesn't read the Result from database!!! You are right about the grid option. It looks more logical for 100 Labels! But I have made an image and put

Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Doriano Blengino
Vassilis K ha scritto: > Dimitri > > I changed it to your proposed option and I get : > "Result is not available" > error at line: > SELECT CASE rsThesi!thesi > > I do not know why it doesn't read the Result from database!!! > > You are right about the grid option. It looks more logical for 100 L

Re: [Gambas-user] Code Editor Problem

2009-10-17 Thread Doriano Blengino
Kad Mann ha scritto: > This looks like a bug to me. > > If I create a module name modConstants and add these two lines: > > PUBLIC CONST BTN_CANCEL AS Integer = 0 > PUBLIC CONST BTN_OK AS Integer = 1 > > If I then edit, say, FMain, I can then refer to those constants by > typing the module name and

Re: [Gambas-user] Code Editor Problem

2009-10-17 Thread Kad Mann
On Sat, 2009-10-17 at 10:52 +0200, Doriano Blengino wrote: > Kad Mann ha scritto: > > This looks like a bug to me. > > > > If I create a module name modConstants and add these two lines: > > > > PUBLIC CONST BTN_CANCEL AS Integer = 0 > > PUBLIC CONST BTN_OK AS Integer = 1 > > > > If I then edit, sa

Re: [Gambas-user] How can I zoom -in, zoom-out and rotate a picture?

2009-10-17 Thread Matti
You can't do that with a picture. Use image instead, this class has methods like rotate. Look in the docs for details. Then either draw the image in a DrawingArea, or convert it into a picture and show it in a PictureBox. Matti Jorge Carrión schrieb: > I need a images and pdf viewer. I've fou

[Gambas-user] loading image

2009-10-17 Thread Matti
I want to display Thumbnails of JPEGs. As Image.Load(Path) and Picture.Load(Path) require a path, right now I do: - extract the Thumbnail from JPEG with a SHELL command - save it to disk as thumb_nnn.jpg - read it again from disk with Image.Load(Path). This is a complicated way and takes really l

Re: [Gambas-user] Form exit code when [X] clicked

2009-10-17 Thread bbb888
Thanks Kad that does the trick! Bruce -- View this message in context: http://www.nabble.com/Form-exit-code-when--X--clicked-tp25919887p25937554.html Sent from the gambas-user mailing list archive at Nabble.com. -- Com

Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Vassilis A. Kanatas
Thank you Doriano, I tested the code that you proposed and got the following error: "Type mismatch: wanted Label, got PictureBox instead" at line: For each alabel in Form1.Children (inside SUB change_bgcolor(...)) I have put all 100 Labels on Form1 above from the picture that I placed on the Fo

Re: [Gambas-user] loading image

2009-10-17 Thread Benoît Minisini
> I want to display Thumbnails of JPEGs. > > As Image.Load(Path) and Picture.Load(Path) require a path, right now I do: > - extract the Thumbnail from JPEG with a SHELL command > - save it to disk as thumb_nnn.jpg > - read it again from disk with Image.Load(Path). > > This is a complicated way an

Re: [Gambas-user] Code Editor Problem

2009-10-17 Thread Benoît Minisini
> This looks like a bug to me. > > If I create a module name modConstants and add these two lines: > > PUBLIC CONST BTN_CANCEL AS Integer = 0 > PUBLIC CONST BTN_OK AS Integer = 1 > > If I then edit, say, FMain, I can then refer to those constants by > typing the module name and a period. Gambas

Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Doriano Blengino
Vassilis A. Kanatas ha scritto: > Thank you Doriano, > > I tested the code that you proposed and got the following error: > > "Type mismatch: wanted Label, got PictureBox instead" > > at line: > For each alabel in Form1.Children (inside SUB change_bgcolor(...)) > > I have put all 100 Labels on Form

Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Vassilis K
I get error: "Result is not available" at line: "change_bgcolor("Label" & rsThesi!thesi)" of the code: PUBLIC SUB Form_Open() DIM i AS Integer DIM rsThesi AS Result MODMain.Connect() rsThesi = MODMain.$Con.exec("select * from egrafes where elenchosAnax = 0") rsThesi.MoveFirst

Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Dimitris Anogiatis
Vassili, Make sure there is data in the rsThesi!thesi field. Open a terminal, and login to mysql and do the Select statement from there and see if all the records have data on the thesi field. if not then you have to do something like this if isNull(rsThesi!thesi) = false then change_bgcolor("

Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Vassilis K
I have changed the Select of rsThesi to find only the records that thesi <> 0 as following: rsThesi = MODMain.$Con.exec("select * from egrafes where elenchosAnax = 0 AND thesi <> 0 ") Now it only counts 42 rows out of 70. But the error is the same as described in my previous email: "Result is no

Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Doriano Blengino
Dimitris Anogiatis ha scritto: > Vassili, > > Make sure there is data in the rsThesi!thesi field. > > Open a terminal, and login to mysql and do the Select statement from there > and see if all the records have data on the thesi field. > > if not then you have to do something like this > > if isNu

Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Doriano Blengino
Vassilis K ha scritto: > I have changed the Select of rsThesi to find only the records that thesi <> 0 > as following: > rsThesi = MODMain.$Con.exec("select * from egrafes where elenchosAnax = 0 > AND thesi <> 0 ") > Now it only counts 42 rows out of 70. > > But the error is the same as described

Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Dimitris Anogiatis
Vassili, Instead of change_bgcolor("Label" & rsThesi!thesi)" do PRINT CStr(rsThesi!thesi) PRINT CStr(rsThesi.Index) to see where it stops make sure it actually prints the same results. Keep in mind that the field name has to be EXACTLY the same as the one you use in mysql. worst comes to the w

Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Vassilis K
I tested : PRINT CStr(rsThesi!thesi) PRINT CStr(rsThesi.Index) Instead of change_bgcolor("Label" & rsThesi!thesi)" and I got everything working fine I got 42 couples of numbers as it should be: 38 0 15 1 47 2 74 3 96 4 etc... up to 42 row !! the first number was the correct rsThesi!thesi

Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Vassilis K
And of cource on: PRINT rsThesi!thesi PRINT "Label" & rsThesi!thesi I get : 2 Label2 12 Label12 57 Label57 47 Label47 33 Label33 56 Label56 44 Label44 11 Label11 78 Label78 3 Label3 etc. at Console window as described in my previous email and the code stops at PRINT rsThesi!thesi with resul

Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Doriano Blengino
Vassilis K ha scritto: > And of cource on: > > PRINT rsThesi!thesi > PRINT "Label" & rsThesi!thesi > > I get : > 2 > Label2 > 12 > Label12 > 57 > Label57 > 47 > Label47 > 33 > Label33 > 56 > Label56 > 44 > Label44 > 11 > Label11 > 78 > Label78 > 3 > Label3 > > etc. > > at Console window as describe

Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Dimitris Anogiatis
Vassili, We're close... try IF rsThesi.Index < rsThesi.Count THEN rsThesi.MoveNext() ENDIF I hope this takes you a bit further in your project Keep up the good work Regards Dimitris On Sat, Oct 17, 2009 at 12:55 PM, Vassilis K wrote: > And of cource on: > > PRINT rsThesi!thesi > PRINT "

Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Vassilis K
Dimitri I don't understand where to place IF rsThesi.Index < rsThesi.Count THEN rsThesi.MoveNext() ENDIF If I use it for the loop of all the rows it only stops at row 2 and it shows Label12 (for example) red It also passes row 1 !!! I don't know if something like GOTO (the beginning of

Re: [Gambas-user] Code Editor Problem

2009-10-17 Thread Kad Mann
On Sat, 2009-10-17 at 16:21 +0200, Benoît Minisini wrote: > > No such thing happens if the module name is from 1 to 3 characters in > > length. The problem is, I need a module to be called k, nothing else, > > and I need the constants to be displayed when I type k and a period. > > Do you mean th

Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Kad Mann
On Sat, 2009-10-17 at 22:46 +0300, Vassilis K wrote: > Dimitri I don't understand Why don't you take a look at the database example in Gambas? After creating the test table, if you type in an SQL command and click the run button, you will see a gridview with a myriad colours that can be changed

Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Dimitris Anogiatis
Vassili, it should look something like this PUBLIC SUB Form_Open() DIM i AS Integer DIM rsThesi AS Result 'connect to the database MODMain.Connect() 'Execute the SQL QueryI hope this helps. rsThesi = MODMain.$Con.EXEC("select * from egrafes where elenchosAnax = 0 AND thesi <> 0

Re: [Gambas-user] saving picturebox as video

2009-10-17 Thread Steven James Drinnan
You could use ffmpeg the cmd is ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg This would make the files img1.jpg img2.jpg into a mpg video. But it would mean writing each image to a dir on the disc ie pic01.jpg pic02.jpg Then once you press a stop button then you run the cmd above. But wr

[Gambas-user] Missing feature?

2009-10-17 Thread Kad Mann
TextBoxes and Labels have an alignment property but DataControls do not. Is that by design? Are there plans to change it? Is there a workaround to allow the alignment of a DataControl, apart from hiding the DataControls and mirroring the data in a TextBox? Also, while I'm asking questions, but o

[Gambas-user] Classes and Modules in Gambas Server Pages

2009-10-17 Thread Dimitris Anogiatis
Hey guys, I know that in gambas server pages there's #USE that allows us to use gambas components. Is there something similar to PHPs include statement to be able to use classes and modules? and when making modules and classes for server pages are there any changes we need to make or points we n