CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

IWCGJQRegions

Suggest new components/features

by jredoc » 19 Jan 2014 21:45

Hello

From a usability perspective, it would be great if the individual borders of a region could have either their style or color (or both) be individually modified.

For example, with two regions whose Align := altop were next to each other. All borders would be the same color, width and style:= sold with exception of the top border of the lower grid would be invisible and the lower border of the top grid whose Style := cbsDashed. This could visually identify the two grids to the end user as distinct regions but yet related to each other in some manner defined by the application.

TIA

John
jredoc
 
Posts: 125
Joined: 11 Jun 2013 03:34

by George » 20 Jan 2014 07:00

You can use CSS rules. It's more correct way for such task.
Best regards!
George
 
Posts: 486
Joined: 23 May 2013 15:50
Location: Russia, Moscow

by Alexander Bulei » 20 Jan 2014 10:31

Hi John,

From a usability perspective, it would be great if the individual borders of a region could have either their style or color (or both) be individually modified.


George wrote:You can use CSS rules. It's more correct way for such task.


Extract :)

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by jredoc » 21 Jan 2014 13:31

Gentlemen

This is where my weakness with CSS and HTML scripting becomes quite obvious.

I understand how to alter a component property when a specific style parameter is associated with the specific property, for example
IWCGPanelList1.Items.Items[0].ItemStyle.Add('color:black');
IWCGPanelList1.Items.Items[1].ItemStyle.Add('color:red');

Also, the CGAppearanceSettiongs.BorderVisiblity property allow the visibility of the sides of a region's border to be individually modified.

However, I don't understand how to utilize CSS to effect a style and/or color change for an individual side of an individual region's border when the BorderOptions property does not delineate the individual sides of a region's border.

I would greatly appreciate an example of what you reference.

John
jredoc
 
Posts: 125
Joined: 11 Jun 2013 03:34

by George » 22 Jan 2014 15:16

Hi!
Each IWCGPanelList item has "ItemCSS" property.
Add any string, for example "MyPLItem" to "ItemCSS" property.
Final string will be "panellist-nav-item-li wRegionLeftMenu".
Then, create txt file, save as "wwwroot\ui-themes\MyStyles.css".
Add text to MyStyles.css:
css code
.MyPLItem{
border-right: 1px dotted #F00;
}

Open servercontroller unit, add code to "BaseConfig" event handler:
delphi code
ContentFiles.Add('ui-themes\MyStyles.css');
Best regards!
George
 
Posts: 486
Joined: 23 May 2013 15:50
Location: Russia, Moscow

by Alexander Bulei » 22 Jan 2014 15:28

Hi John,

You can use the Style property to do this.

Set the BorderOptions:

delphi code
BorderOptions.NumericWidth:= 1;
BorderOptions.Style:= cbsSolid;


Example Style property:

22-01-2014 14-23-16.png


Result:

22-01-2014 14-23-02.png


Check the available css properties here: http://www.w3schools.com/cssref/pr_border-bottom_color.asp (left column)

Best Regards.
You do not have the required permissions to view the files attached to this post.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to Suggestions

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.