PDA

View Full Version : Another Grid Question



gungadout
16-12-2010, 12:10
Hi Folks,

Looking at the grid example provided in the examples, and according to my own testing, setting the WindowBkColor sets the colour of the window to the right of the grid for an indefinite length which stretches to the right hand end of the window no matter how wide you make the window.

My experimentation so far has failed to allow me to place a text box to the right of a grid. (That may be simply because I have not defined the positioning values properly.)

But I need to ask the question: can text boxes, labels and other grids be placed beside the first grid defined?

If so, if someone could prepare a quick example, that would be greatly appreciated.

Thanks in advance and expectation,

Peter H.

Petr Schreiber
16-12-2010, 12:36
Hi Peter,

do you mean placing the MLGrid and then putting another control, for example textbox, on the right side from it?

In the sample, when sizing occurs, this is executed:


dialog get client cbhndl to w1, h1
Control Set Size CBHNDL, %IDC_MLGRID, w1, h1 - (ToolBarH) - 21

That means whole client area is filled with MLGrid. But if you want to let some space on the right for textbox, you can do something like:


dialog get client cbhndl to w1, h1
Control Set Size CBHNDL, %IDC_MLGRID, w1 - 100, h1 - (ToolBarH) - 21

... to let 100 units free on the right for other controls.


Petr

gungadout
16-12-2010, 13:08
Thanks Petr.

That looks like the tip I was after.

I'll give it a go.

Regards,

Peter H.