YUI3: Whats the best way to read Height of an element? - yui3

I want to increase height of an element by X pixels by writing a YUI3 script.
Whats the best way ?
if I use 'Node' module and read the height as node.getStyle("height");
The results of FF3 shows a string "100px" where as for IE8 its just blank. :(
Please help.

node.getStyle('height') only returns a value when you have a value set in the style of the node. To get the height of a node with out a style set use node.getComputedStyle('height') or node.get('clientHeight').
If you have overflow set, you can use node.get('scrollHeight') to get the full height of the content.
To update the height of the node, use setStyle('height', value)

Related

Vuetify v-spacer has no effect

In my modal <v-dialog>, I try stick one block to the bottom of the <v-col> block by using <v-spacer>, but it has no effect. What am I doing wrong?
Example: https://codesandbox.io/s/vuetify-template-viov1?file=/src/App.vue
I also tried to solve this by adding "d-flex flex-column" to the parent's col class, but in that case size of each row is anomalous
https://codesandbox.io/s/vuetify-template-6wr6g
Thanks for any hints
This is working: https://codesandbox.io/s/vuetify-template-yns2m?file=/src/App.vue
The problems are:
Incorrect usage of v-container, v-row and v-col - causing the weird spacing issues.
There should be a fixed height container for the v-spacer to work as expected.
not sure why you are using so many rows inside columns inside rows...
that's just the height of the row.
look at this example, I set a height and the spacer works:
https://codesandbox.io/s/vuetify-template-s3pe2?file=/src/App.vue

Line_width not working in Vulkan

I enabled wide_line feature in VkPhysicalDeviceFeatures and i am giving appropriate value in pRasterizationState as well. But i dont see the width increased for the lines. What am I missing here?
Does the implementation support wide lines? Check the value of VkphysicalDeviceFeatures:: wideLines you get from vkGetPhysicalDeviceFeatures. Also check the lineWidthRange and lineWidthGranularity in VkPhysicalDeviceLimits.
Are you setting VK_DYNAMIC_STATE_LINE_WIDTH in VkPipelineDynamicStateCreateInfo::pDynamicStates? If so, you need to set the line width using vkCmdSetLineWidth rather than VkPipelineRasterizationStateCreateInfo::lineWidth.

How to fill available tableview width with columns?

When tableview is created, the default behaviour of columns is to leave a lot of empty space. Is there a way to automatically fill the space?
One solution is described here:
JavaFX 2 Automatic Column Width
but this seems a little cumbersome.
TornadoFX comes with an advanced column resize policy called SmartResize. You assign it to a TableView like this:
columnResizePolicy = SmartResize.POLICY
By default it tries to do something useful depending on the data, and it will assign any left over width to the last column.
You can configure resizing options per column by calling the appropriate configurator function. For example, to tell the policy to give remaining width to a given column:
column("Name", Person::nameProperty).remainingWidth()
You can configure multiple columns to receive remaning width, so that they will share the remaining width between them.
contentWidth() will make sure the column width fits the content, with optional additional padding: contentWidth(padding = 50.0).
Most resize options also take an optional useAsMin parameter which will enforce the given setting as a minimum width for the column. useAsMax does the same for max width. You will get a fixed size by setting both useAsMin and useAsMax or specifying the fixedWidth(width) option.
You can distribute space using the weigthedWidth(weightNum) function, or even the pctWidth(pctNum) function. All these modes can be combined
Please see the TornadoFX Guide chapter about the resize policy for more information:

Displaying on label

I want to display some text means name of any source file with extension in a label. But the width is fixed and if the name is more than the width I want the name to be displayed like "Women Que...nnaire.jpg". Is it possible to display like this . If possible please let me know.
Set following in your label object:
adjustsFontSizeToFitWidth=NO;
lineBreakMode=NSLineBreakByTruncatingMiddle;
numberOfLines=1;
This is your answer;
Set :
lablel.adjustsFontSizeToFitWidth=YES;
Set Minimum font size of text;
lablel.minimumFontSize=10;// depends on you. How small font you want!
auto adjust size from label using this property using--
sizeToFit

How to customize marker/symbol properties in matplotlib?

Example command:
prop = matplotlib.pyplot.scatter(x,y,s=s,c=c)
dir(prop) shows set_edgecolor, set_edgecolors, set_linestyle, set_linestyles - why so many variations on the same thing?
Also, how do I remove the edgecolors? Setting values to None does nothing. And how do I change the marker size after the plotting? There does not appear to be a markersize attribute that I can access...
Edit
If the symbols are generated through plyplot.plot, there is a markersize attribute to change it seems. But with pyplot.scatter, not present.
It'd give using 'none' a go to see if that solves your issue with edgecolor. That typically sets attributes to no color.