Plex 2E

Expand all | Collapse all

Colour Selector Dialog for WinC

Jump to Best Answer
  • 1.  Colour Selector Dialog for WinC

    Posted 03-15-2017 11:36 AM

    Hello All

    I need a colour selector dialog for a WinC panel.  Is it possible to create a ColorDialog class object at run time and attach to the panel? I know this is possible for a WPF panel but not sure about WinC.. If not, what are my options here?

     

    Many thanks,

    Shefeeque.    



  • 2.  Re: Colour Selector Dialog for WinC
    Best Answer

    Posted 03-15-2017 12:35 PM

    Hello Shefeeque,

     

    Try using CommonDialog control.

     

     

    Regards

    AA



  • 3.  Re: Colour Selector Dialog for WinC

    Posted 03-16-2017 02:03 PM

    Great... Thank You Ashfaq



  • 4.  Re: Colour Selector Dialog for WinC

    Posted 03-16-2017 05:01 AM

    Use Plex runtime  see in plex help "ObControlAPI::SetProperty"  You can use the special value *DIALOG 

     

    See StellaTools model:  StellaTools.AutoTestBox.UI.Abstract._MaintainModelConfig

     



  • 5.  Re: Colour Selector Dialog for WinC

    Posted 03-16-2017 02:09 PM

    Thank You George. I will check that.. Say, I selected a colour for a record and stored that colour value to database against that record.

    I want to display those records in a WinC grid and I want the selected colour to be displayed in the Grid in a particular column. Is it possible to change the background colour of a grid cell using runtimes? I can't use control states..

     

    Many thanks,

    Shefeeque



  • 6.  Re: Colour Selector Dialog for WinC

    Posted 03-17-2017 05:03 AM

    well from my screen shot that is exactly what I am doing but in a single instance. I allow the user to choose a colour and that colour is saved to the database, then the current colour is displayed in the REGION  control. But grids you can't (see winwidgets help and there are no api to change colour of cells)...work around is to select the grid row and display the record in a single instance and copy my code.



  • 7.  Re: Colour Selector Dialog for WinC

    Posted 03-17-2017 07:11 AM

    okies .. May be I have to replace the Plex grid with a MSFlexGrid control ... then this is easy...thanks George.