Jump to content

TuniDBGrid Title Height


Alf

Recommended Posts

Hi, at design time I can change the TitleFont.height of the title and the fonts but when I run the App the fonts stays at that size but the Height returns to it original size no matters what I do. Is it Theme dependent? If so, how can I modify the theme? Also I would like to modify themes in case it is possible. Thanks in advance, 

 

Link to comment
Share on other sites

4 hours ago, Alf said:

at design time I can change the TitleFont.height of the title and the fonts but when I run the App the fonts stays at that size but the Height returns to it original size no matters what I do.

Hi,

Can you try this CustomCSS?

UniServerModule.CustomCSS:

.x-column-header {
    line-height: normal;
}
 

 

Link to comment
Share on other sites

Sherzod, now it works. Thank you. Any plans to add a configuration property to object inspector for Title? How can I change the color for example? Where can I find information about CSS class to modify uniDBGrid? And BTW I know nothing about CSS.

Thanks in advance,

 

Link to comment
Share on other sites

Thanks again Sherzod, how can I access the colors of the Themes? For example I would like to make the Grid Title Background with the same color as the Panel Title Background. 

Also, how can I do a vertical alingn of the Titles to make the image looks better? 

 

Clipboard01.jpg

Link to comment
Share on other sites

36 minutes ago, Alf said:

For example I would like to make the Grid Title Background with the same color as the Panel Title Background. 

I think at the moment you should choose and set the color yourself, which is identical to what you want...

38 minutes ago, Alf said:

Also, how can I do a vertical alingn of the Titles to make the image looks better? 

Can you please explain?

Do you want to align to the top?

Link to comment
Share on other sites

Choosing the color myself is not a solution. If the user changes the There that color won't change. What I'm asking for is the minimum parametrization for a Grid to have a coherent application. 

 

Yes I would like to align all text to the top. If you watch the image "Precio" is lower then "Barcode" and it looks bad. 

 

Link to comment
Share on other sites

4 hours ago, Alf said:

Yes I would like to align all text to the top. If you watch the image "Precio" is lower then "Barcode" and it looks bad. 

You can try this customCSS:

.x-column-header-text-wrapper {
  vertical-align: top;
}

 

Link to comment
Share on other sites

Didn't work this time. The text is still on the center. 

How can I activate the cell editor by code? For examplo DBGrid.setFocus; DBGrid.Column[1].Edit or something? Of course double clicking it activates but I need to make it active to speed up the process or typing. Thanks in advance, 

 

Link to comment
Share on other sites

Hi, I never got answered this. This is pretty important for application coherent look and feel. . 

On 6/12/2020 at 3:27 PM, Alf said:

Choosing the color myself is not a solution. If the user changes the There that color won't change. What I'm asking for is the minimum parametrization for a Grid to have a coherent application. 

 

Yes I would like to align all text to the top. If you watch the image "Precio" is lower then "Barcode" and it looks bad. 

 

 

Link to comment
Share on other sites

6 hours ago, Sherzod said:

Can you make a simple app to test?

Hi I prepared the TestProject and realized that the order or the CSS matters. When I copy the CSS in the different order it worked. My questions... how can I know that the order matters? 

.x-column-header-text-wrapper {
  vertical-align: top;
}

.x-column-header {
    line-height: normal;
}


 

Link to comment
Share on other sites

13 minutes ago, Sherzod said:

 

 

There is not an example for this... What I'm asking is how access color values from Themes and use them to the Grid. From example I want to get the color from the Panel's Title Bar and use it to the DBGrid Title bar. 

Link to comment
Share on other sites

20 minutes ago, Alf said:

There is not an example for this... What I'm asking is how access color values from Themes and use them to the Grid. From example I want to get the color from the Panel's Title Bar and use it to the DBGrid Title bar. 

Yes, and for this I did not ask for a test case.
It seems to me that there is no standard way to access the color schemes of themes.

Link to comment
Share on other sites

3 hours ago, Alf said:

how can I know that the order matters? 

 

Cascading style sheet rules can be located in several places, which include browser default style sheet, external style sheet, embedded styles, and inline style rules.

The closer a rule is to the content being styled, the higher its precedence. The cascade of rules starts with the furthest and goes toward the closest to the content.

Browser style sheet have lowest precedence

All browsers have a built-in default style sheet. The cascade starts with these styles. If you have no styles defined, the browser styles will be used. Note that defaults are slightly different in each browser. It is a good idea to examine a page with no styles in each browser in order to see any difference.

External style sheets have next precedence

Browser default styles are overridden by the rules in external style sheets. If there are several external style sheets, they apply in the order listed.

Embedded styles

Styles embedded in the page header are the next in order of precedence. If there are many rules, typically they are placed in an external style sheet.

Inline styles have top precedence

Finally, since inline styles are closest to the content, they take top precedence.

Specific rules

The more specific a rule is, the greater its precedence.

Any rule on a tag is the least specific. A class rule is more specific and overrides the tag rule. Since an ID rule can be used only once in a web page, it is the most specific, overriding the other two.

For example, if the style sheet defines <h1> as being centered, then <h2 class="left"> takes precedence and <h2 id="right"> takes precedence to both rules.

Later rules take precedence

Finally, sort the rules by the order they were defined. Rules that are defined later in the document tree have higher precedence than those defined earlier.

And rules from an imported style sheet are considered before rules directly in the style sheet.

Summary

The location of the styles and rules is one factor in the order of precedence. Specific rules take precedent over more general rules. Also, the rules toward the end of a style sheet take precedence over the front rules.

https://www.school-for-champions.com/web/css_cascade_order.htm#.XuaA2Tr7SUk

Link to comment
Share on other sites

8 hours ago, Sherzod said:

This order works for me.


.x-column-header {
    line-height: normal;
}

.x-column-header-text-wrapper {
  vertical-align: top;
}

 

Invert the order in the Test project and you will see they won't work. 

Link to comment
Share on other sites

2 hours ago, Alf said:

Invert the order in the Test project and you will see they won't work. 

Something you have is wrong on your side I think, in this case the order does not matter.

We can use a TeamViewer to verify this.

Link to comment
Share on other sites

17 hours ago, Sherzod said:

Something you have is wrong on your side I think, in this case the order does not matter.

We can use a TeamViewer to verify this.

Anytime you want. Thanks in advance, 

Link to comment
Share on other sites

Hi I just copy and paste that Grid in another Frame and again the same problem. It is still working fine in the first Frame. 

It should be great if you guys create properties for all those CSS and we avoid all these problems. 

 

Clipboard02.jpg

Link to comment
Share on other sites

39 minutes ago, Alf said:

I just copy and paste that Grid in another Frame and again the same problem. It is still working fine in the first Frame. 

It should be great if you guys create properties for all those CSS and we avoid all these problems. 

Hi,

Can we use a TeamViewer?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...