change table row color issue

View: New views
6 Messages — Rating Filter:   Alert me  

change table row color issue

by IOLAUS :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

( sry for my poor english )

I have a table and want to change the row color with a colorPicker. The result of the colorPicker is a Hex code like #ff0000 and it works, but i cant change the color of the row regard of the result of the colorPicker.

My solution is creating styleSheet's for each colors, but i have more than 200 colors...

If you have an idea, please let me know. Thank you.



Regards,

IOLAUS

Re: change table row color issue

by IOLAUS :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I need this function: tableColumn01.setStyle("background-color: rgb(0, 255, 0);");

but for the TableRow like tableRowGroupName.setStyleClasses(styleClasses);





IOLAUS wrote:
Hello,

( sry for my poor english )

I have a table and want to change the row color with a colorPicker. The result of the colorPicker is a Hex code like #ff0000 and it works, but i cant change the color of the row regard of the result of the colorPicker.

My solution is creating styleSheet's for each colors, but i have more than 200 colors...

If you have an idea, please let me know. Thank you.



Regards,

IOLAUS

Re: change table row color issue

by IOLAUS :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

i have fixed this Problem with a Method that give me the actual row count back and return the color. Second i have Bind the Object on a Style and it works.

Kind Regards,

IO.



I need this function: tableColumn01.setStyle("background-color: rgb(0, 255, 0);");

but for the TableRow like tableRowGroupName.setStyleClasses(styleClasses);





IOLAUS wrote:
Hello,

( sry for my poor english )

I have a table and want to change the row color with a colorPicker. The result of the colorPicker is a Hex code like #ff0000 and it works, but i cant change the color of the row regard of the result of the colorPicker.

My solution is creating styleSheet's for each colors, but i have more than 200 colors...

If you have an idea, please let me know. Thank you.



Regards,

IOLAUS


Re: change table row color issue

by Rick Fincher :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi IO,

Can you post the method for others who may have a need for this?

Thanks!

Rick

IOLAUS wrote:

> Hello,
>
> i have fixed this Problem with a Method that give me the actual row count
> back and return the color. Second i have Bind the Object on a Style and it
> works.
>
> Kind Regards,
>
> IO.
>
>
>
> IOLAUS wrote:
>  
>> I need this function: tableColumn01.setStyle("background-color: rgb(0,
>> 255, 0);");
>>
>> but for the TableRow like tableRowGroupName.setStyleClasses(styleClasses);
>>
>>
>>
>>
>>
>>
>> IOLAUS wrote:
>>    
>>> Hello,
>>>
>>> ( sry for my poor english )
>>>
>>> I have a table and want to change the row color with a colorPicker. The
>>> result of the colorPicker is a Hex code like #ff0000 and it works, but i
>>> cant change the color of the row regard of the result of the colorPicker.
>>>
>>> My solution is creating styleSheet's for each colors, but i have more
>>> than 200 colors...
>>>
>>> If you have an idea, please let me know. Thank you.
>>>
>>>
>>>
>>> Regards,
>>>
>>> IOLAUS
>>>
>>>      
>>    
>
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: change table row color issue

by IOLAUS :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Rick,


public String getColumnStyle() {
       
        TableRowDataProvider trdp = (TableRowDataProvider) getBean("currentRow");
        RowKey rk = trdp.getTableRow();
       
        // get actual row count
        SoilLayer layer = getSessionBean1().getLayers()[Integer.parseInt(
                        rk.getRowId())];
     
        return "background-color: "+layer.getColorRGB(); // return Color in HEX
}

I hope it helps.


Regards,

IO.

Rick Fincher wrote:
Hi IO,

Can you post the method for others who may have a need for this?

Thanks!

Rick

IOLAUS wrote:
> Hello,
>
> i have fixed this Problem with a Method that give me the actual row count
> back and return the color. Second i have Bind the Object on a Style and it
> works.
>
> Kind Regards,
>
> IO.
>
>
>
> IOLAUS wrote:
>  
>> I need this function: tableColumn01.setStyle("background-color: rgb(0,
>> 255, 0);");
>>
>> but for the TableRow like tableRowGroupName.setStyleClasses(styleClasses);
>>
>>
>>
>>
>>
>>
>> IOLAUS wrote:
>>    
>>> Hello,
>>>
>>> ( sry for my poor english )
>>>
>>> I have a table and want to change the row color with a colorPicker. The
>>> result of the colorPicker is a Hex code like #ff0000 and it works, but i
>>> cant change the color of the row regard of the result of the colorPicker.
>>>
>>> My solution is creating styleSheet's for each colors, but i have more
>>> than 200 colors...
>>>
>>> If you have an idea, please let me know. Thank you.
>>>
>>>
>>>
>>> Regards,
>>>
>>> IOLAUS
>>>
>>>      
>>    
>
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@visualweb.netbeans.org
For additional commands, e-mail: users-help@visualweb.netbeans.org

Re: change table row color issue

by IOLAUS :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I dont have change the row group color of the table. I have changed the column color of the actual row.

The method have to bind with the column style!



IOLAUS wrote:
Hello,

( sry for my poor english )

I have a table and want to change the row color with a colorPicker. The result of the colorPicker is a Hex code like #ff0000 and it works, but i cant change the color of the row regard of the result of the colorPicker.

My solution is creating styleSheet's for each colors, but i have more than 200 colors...

If you have an idea, please let me know. Thank you.



Regards,

IOLAUS