FormTable - BackColor problem

Discussions regarding 1C:Enterprise for mobile devices with Android, iOS, or Windows Phone.

#1
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Mar 23, 2016
Company: SmartID

Hello ! I have a FormTable with BackColor = 255,255,255 and SelectionMode=SingleRow.  On Selection event, I want that row I select to change its color to 170,170,170 for example, and when I select other row, the previous row to change its color to table's BackColor(255,255,255). I found this impossible to solve.  Can somebody help me please? It is very important to me .

Edited: Sebastian Dan - Apr 08, 2016 06:05 AM
 
#2
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello, Sebastian Dan!

You can not change background of selected rows. This is the part of 1C:Enterprise platform design. But maybe you can explain your task in more details, so we could suggest another solution?

 
#3
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Mar 23, 2016
Company: SmartID

When I sel ect an entry fr om the FormTable, I need that row to change its color to any color, even to 1c's yellow, to know what is the selected row. I need to get a visual feedback of the selection.

Edited: Sebastian Dan - Apr 11, 2016 01:28 AM
 
#4
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Sebastian Dan,

I don't understand then what is the problem? I set the background color of a list and select items, they all have the background that I set (after clearing the UseAlternationRowColor check box) and when I select one of rows, I see it having yellow background.

I have attached the infobase dump to this message. You can use it to create your own example how to reproduce your issue.

Download 1Cv8.dt (33.21 KB)
Download list.png (31.05 KB)
 
#5
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Mar 23, 2016
Company: SmartID

My application is for Mobile and my FormTable is in a Form from common forms. I set the FormTable's BackColor to 178,178,178, but on Mobile, the BackColor is still white.   When I press on a row to select it, I can see that row's color changes to yellow, but when I release, it goes back to white, instead of staying yellow.

 
#6
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Sebastian Dan,

I tried to do this in a mobile application and when I click a row in a table, the item form is opened, so you don't see the list after selecting a row. How do you do this in your mobile application?

 
#7
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Mar 23, 2016
Company: SmartID

I think you didn't understand me. I am working on a form in common forms. In this form, I have a FormTable set to ReadOnly. I am not using a list form. All I need to do is when I select a row ( on mobile platform ), that row should change its color to yellow.

 
#8
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Can you please create a sample configuration where I could reproduce this issue?

 
#9
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Mar 23, 2016
Company: SmartID

Sorry for late reply.

Please download this *.cf and run it on mobile.

Edited: Sebastian Dan - Apr 12, 2016 01:03 AM
 
#10
People who like this:1Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello,

I have added a boolean field to the table that keeps the state of a string, a conditional appearance to the form for this field value, and those 2 lines of code to the row selection event handler:

Code
   SelectedRowObject = ProductsTable.FindByID(SelectedRow);
   SelectedRowObject.Selected = Not SelectedRowObject.Selected;

Please, find an example in the attached configuration.

Download 1Cv8.cf (8.51 KB)
 
#11
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Mar 23, 2016
Company: SmartID

Thank you very much, Timofey !
This solved my problem.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.