How to calculate the number of visible columns in a MSFLEXGRID - vb6

How Do I calculate the number of visible columns in a MSFLEXGRID in characters in VB6?
I have the form ScaleMode set to characters.
I tried the .height property, but it doesnt change as I change the font size

Related

How would I embed an image in a PowerPoint 2016 table cell?

I would like to create a 7 column by 5 row table of JPG images a PowerPoint slide.
If I create a table in PowerPoint and insert an object from a JPG file, the image floats over the table.
Is there a way to put an image into a table cell in PowerPoint 2016?
If the image is in the same aspect ratio as the cell you mean to fill, or if you don't mind the image getting distorted if the aspect ratios don't match, fill the cell with the picture.
Sub TestIt()
Dim oTbl As Table
Set oTbl = ActivePresentation.Slides(1).Shapes(3).Table
Call FillCellWithPicture(oTbl, 4, 2, "c:\temp\picture.jpg")
End Sub
Sub FillCellWithPicture(oTable As Table, lCol As Long, lRow As Long, sPicture As String)
oTable.Cell(lRow, lCol).Shape.Fill.UserPicture (sPicture)
End Sub
There is an alternative method that will preserve the image aspect ratio, but the size is controlled by text size and not cell height/width, you cannot fill the entire height of cell either.
This is best for icons or status symbols but works for all images.
Select the cell
Expand the Bullet-list menu
Select Bullets and Numberings
Select the option Picture
Select a Picture, from your file system or through some of the other options
You get a preview of your Picture-bullet
Type a space as the bullet will not show if there is no text
Optional
Select the text, the space, and change font size to resize your image
Set vertical and horizontal alignment for the cell to have your picture display as you want
In the Bullets and Numberings menu you can increase the image size relative text size but you will get an offset.
PS. you can quickly hide the image by deleting the space, and then show it again by adding the space
I hope this can come to use...

Stacked table column widths

You can use a GeneXus HTML table to layout text blocks and attributes. If I add a second table to contain some other information that I want to conditionally display, quite often, the first cell is a different width to the first cells of the table stacked above it.
How do you make all the columns/cells the same width so that stacked tables display with their contents correctly aligned?
This is for GeneXus Web in Evo 2 & 3.
Thanks
Put a value in the width property of the client table first cell.
So, put the same value in the width property of the password table first cell.
Remember that the width value must be enough for both tables. In your case, the biggest textblock is the "Client Name". So, choose a width enough for that.
Best regards.
If you don't set a width, HTML will assume the minimum width required to accommodate the content. If you don't want it to be set automatically when when the page is displayed, you have to decide on a width.
In your case, you have to put the same width value for a cell (any cell) in the first column of both tables.

jqrid column width should be displayed based on the length of the column content

in my jqgrid i have several columns, the first columns length is big, the remaining columns are small. So all the columns are having a big width. I want the column width to be displayed as per the data content of the column. I cannot specify the width in pixels.
I tried using the autowidth propety but it doesnt work for me. Any suggestions please.

How to limit the Textbox size in WP7?

In WP7 I am trying to limit the Textboxtext size.
Please guide me in this with sample.
You can limit it by Width or Height property. In this case TextBox will be only with provided sizes.
Otherwise, you can set MaxWidth and MaxHeight. In this case Width and Height will automatically adjust by situation but not great than you specify.
MaxLength property can be used also. It limits the number of characters that can be displayed. TextTrimming handles how to trim text when it out of screen, i.e. add ... in the end, for example.

How to set optimal width for labels column in jqgrid edit and view forms

jqGrid edit and view forms row labels (they are same as column captions ) are set at runtime.
Sometimes they are narrow and sometimes wide.
For narrow labels column width in too big. There is too much empty place between label text and value field.
It looks like labelswidth: '30%' value is hard coded.
How to adjust edit and view form labels columns width automatically so that if all labels are narrow, column width is smaller ?
The first which I would try to do is to use the values in pixel instead of percents:
labelswidth: 80, width: 600

Resources