Author Topic: How to change style in Client Script  (Read 5576 times)

Offline dounax

  • Full Member
  • ***
  • Posts: 18
  • Karma: +0/-0
    • View Profile
How to change style in Client Script
« on: January 28, 2010, 01:19:08 AM »
I'm begining a migration and i have a little question about client script in C#.

How can we change the style of field in Client Script? ( font, background, color ...)

I've tried this.FormControl.GetControlByDataName[field].XXX but i haven't found any function which change the style.


Have you an idea?

Thanks for read my post

Offline CarlC

  • Hero Member
  • *****
  • Posts: 267
  • Karma: +28/-5
    • View Profile
Re: How to change style in Client Script
« Reply #1 on: January 28, 2010, 07:47:14 AM »
you need to get at the windowscontrol version of the control, rather than the Pivotal version.

This can be done doing

CdcSoftware.Pivotal.WindowsFormControls.TextBoxControl txtBox = (CdcSoftware.Pivotal.WindowsFormControls.TextBoxControl) GetControl("").WindowsControl;

txtBox.BackColor = System.Drawing.Color.White;

txtBox has other properties.

Not sure whether this is supported or will disappear if Pivotal changes something on their end, but works.

Offline dounax

  • Full Member
  • ***
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: How to change style in Client Script
« Reply #2 on: January 28, 2010, 08:24:49 AM »
THX, it's work.

I need just to cast my Pivotal control object to get to the style method.