icons inside form fields

Hi,

I have 2 issues

  1. I have a requirement where I need a search box with a small icon ( a maginfying image or anything) inside the text/search box. Something similar to what we have in the smartclient reference page.

But the only difference is the icon should behave like a combo box with some select options to select from and search. Something similar to Google-enhanced search box (http://www.google.co.in/). How can we get this output.

  1. In continuation to the above example the second requirement is a calender icon inside the text box, on click of which it should serve the date(calender) funtionality.

Please help me

These are both basically skinning tasks. Remove the default border from the TextItem’s textBoxStyle, then combine it with an Img in an HLayout to create an icon that you can add a menu to, then add a border or round edges around the HLayout.

For the calendar functionality, you can manually create a DateChooser.

datechooser

Hi,

Thanks i was able to do the skinning, but i am facing issue when trying to create the datechooser.

I have an image and on click of that image i should get the date chooser

I have used the following code just to test if that works.

  isc.Img.create({
      styleName:"history-image-Skin",
      imageType: "normal", 
      width:10, 
      height:10,
     src: "../images/search/calendar.png",
     // click:"isc.say('Calender widget to be implemented!');"
     click:"isc.DateChooser.create();"
})

when I try the above code in smartclients feature explorer, i am able to get the calender widget on click of the image, but in actuals when I am trying to implement it in my code, its not coming up.

Can you please help me out with the correct approach if this is wrong.

That works in an ordinary page. Maybe check the Watch tab in the Developer Console to see where your DateChooser is - it might be underneath something else?