Topic: Position of pop-up form

Hello Dmitry and MVD Team,

I use a pop-up form to display some menu options. 
This pop-up form shows in the centre of the screen (see dmitry1.jpg).
I manually re-position this (see dmitry2.jpg).
This is okay until I close the application but when I start the application again, the pop-up form is in the centre again.
Is there a way for MVD to remember the last position of the pop-up form?
My application is attached and I am using Version 1.51.
Thanks,
Derek.

Post's attachments

Attachment icon dmitry driveschool.zip 876.04 kb, 497 downloads since 2015-05-08 

Re: Position of pop-up form

Hello,



Please, download fixed project.
Also you can download example:
http://myvisualdatabase.com/forum/misc. … download=1

Post's attachments

Attachment icon dmitry driveschool2.zip 30.54 kb, 501 downloads since 2015-05-08 

Dmitry.

Re: Position of pop-up form

Hi Dmitry,
I wasn't sure if it could be done by writing to the registry or perhaps with a .ini - but I would have struggled either way to write it.
I've just tried it and it works exactly how I wanted it to.
Thanks as always for the quick response.
Derek.

Re: Position of pop-up form

Hello Dmitry

Is it possible to get same scenario for last positions of any grid ?
Sometimes we have to reposition any column of the grid.
Or better than this, would it be possible to have a function which
autofit witdh of a column according to its content ?

Thanks

JB

Re: Position of pop-up form

jean.brezhonek wrote:

Or better than this, would it be possible to have a function which
autofit witdh of a column according to its content ?

Thanks

JB

BestFitColumns -  AutoFit columns, depending on their content.
This method must be called in the event OnChange component TableGrid.

Example:

 Form1.TableGrid1.BestFitColumns(); // AutoFit to contents of the cells
 Form1.TableGrid1.BestFitColumns(bfBoth); // AutoFit to contents of the cells and column names
 Form1.TableGrid1.BestFitColumns(bfHeader); // AutoFit columns by name


Also try this example (dynamic row heights, depending on cells contents)
http://myvisualdatabase.com/forum/misc. … download=1

Dmitry.

Re: Position of pop-up form

Cool
Works fine

Thanks Dmitry

JB

Re: Position of pop-up form

Hello Dmitry

I would like change color of a row when I click on a cell grid.
By default, MVD uses blue (bluesky).
As my grid is already painted in blue, I would like use another color
(yellow, or another).

What will be the good code ?

....OnClick ....
Form1.TableGrid1.SelectedRow.Color := clYellow;

It doesn't work. It needs an array I don't need.

Thanks for your help

JB

Re: Position of pop-up form

Please, download latest beta version:
https://www.dropbox.com/s/s1roiqthyx7hx … 2.zip?dl=0


    Form1.TableGrid1.AppearanceOptions := aoHintMarks+aoIndicateSortedColumn;
    Form1.TableGrid1.SelectionColor := clYellow;
Dmitry.

Re: Position of pop-up form

Dynamic cell size is a must, so cool!!