on 04-24-2006 12:53 PM
Hello,
I want to store images in a image user field.
Somebody knows how to link a picturebox to a General/Image user field, because there is not specific image data type in BoDataType collection:
oUserDataSource = oUserForm.DataSources.UserDataSources.Add("rgto1",BoDataType.???
Thanks
Blas Gonzalez
Hello Blas,
There is no data type as PICTURE, and what you need to do is to set the value of your binded datasource to the path of the picture.
Here is an example of binding the picture to a column of
Set oColumn = oColumns.Add("PICTURE", it_PICTURE)
oColumn.TitleObject.Caption = "PICTURE"
oColumn.Width = 200
oColumn.Editable = False
'// Add a user data source
matrix.
oForm.DataSources.UserDataSources.Add "PICTURE", dt_LONG_TEXT, 500
'// bindidng the data
Set oColumn = oColumns.Item("PICTURE")
oColumn.DataBind.SetBound True, "", "PICTURE"
'// setting the user data source data
Set oUserDataSource = oForm.DataSources.UserDataSources.Item("PICTURE")
oUserDataSource.Value = App.Path & "aaaa.JPG"
Hope this helps,
Nick He
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to use a DBDatasource... not a userdatasource...
//Create dbds
//Create item
Item i = form.Items.Add("ItemUID",BoFormItemTypes.it_PICTURE);
i.Width = Width;
i.Height = Height;
PictureBox pb = (PictureBox)i.Specific;
pb.DataBind.SetBound(true,"TABEL","FIELD");
If do not have a dbds you don't need a userdatasource
Item i = form.Items.Add("ItemUID",BoFormItemTypes.it_PICTURE);
i.Width = Width;
i.Height = Height;
PictureBox pb = (PictureBox)i.Specific;
pb.Picture = "PicturePath.jpg";
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.