cancel
Showing results for 
Search instead for 
Did you mean: 

How to highlight the Textbox red in colour

Former Member
0 Kudos

Hi all,

I have a requirement to highlight the textbox (border) red in color. Any body having idea on this, how to do?

I know to do this via

wdComponentAPI.getMessageManager().reportContextAttributeMessage(

wdContext.currentContextElement(), wdContext.getNodeInfo().getAttribute("name"),

IMessageTestMsgPoolComp.MY__AGE_ERROR,arg,true);

Where arg is the Object Array.

But for this i will get an error message. I don't want to display any error message. I just want to highlight some textboxes in the view.

Thanks in Advance,

VJR.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi VJR,

If u want this only for validations,i would suggest u to go for this approcah.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/837d9290-0201-0010-1381-e633fe17cb14">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/837d9290-0201-0010-1381-e633fe17cb14</a>

regards

Sumit

Former Member
0 Kudos

Hi Sumit,

Thankyou for your reply. I don't want to do validations for the input field.

For End-User understanding we need to highlight some text boxes so that he can observe the changes. So can any body tell me that is there a chance to highlight the text boxed in normal scenario.

Thanks in Advance,

VJR.

former_member182294
Active Contributor
0 Kudos

Hi VJR,

I am not sure if you can get exactly red color border, but there is a way you can high light the text field.

- Change the <b>parent container Layout</b> for Input Field to Matrix Layout.

- Now if you check LayoutData properties of Input Field you can see <b>Cell Back ground design</b> property. You can use various designs which high lights the field.

If you want to acheive this dynamically then you can write the following code in wdModifyView().

IWDInputField inField = (IWDInputField)view.getElement("my_input");

IWDMatrixData matrixData = (IWDMatrixData)inField.getLayoutData();

matrixData.setCellBackgroundDesign(WDCellBackgroundDesign.BORDER);

Regards

Abhilash

former_member751941
Active Contributor
0 Kudos

Hi VJR,

Check this thread.

Regards,

Mithu

Answers (0)