Problemas con Grid

Moderator: Rathinagiri

Post Reply
Mario Mansilla
Posts: 269
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

Problemas con Grid

Post by Mario Mansilla »

Hola :
Tengo problemas con el comportamiento del control grid
Quiero reemplazar el control browse por el grid pero se me presentan 2 inconvenientes :
1 - ¿como puedo hacer usando el ide para que aparezca la barra de scroll vertical?
2 - generalmente uso el control browse ya que solo muestro la base de datos y edito en un form aparte , pero con el control grid no puedo mostrar la barra horizontal completa , solo campo or campo . ¿Es posible realizar esto?

Uso Hmg 30.34 siempre con ide y Win Xp Sp2
Saludos .
Mario Mansilla

Hello
I have problems with the behavior of grid control
I want to replace the control browse for the control grid but I have two drawbacks:
1 - Do as I can do using the IDE to display the vertical scroll bar?
2 - I generally use the browse control because only show the database and edit in a separate form, but with the grid control I can not display the full horizontal bar, single field or field. Is it possible to do this?
Attachments
gridtest.rar
(585.03 KiB) Downloaded 551 times
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Problemas con Grid

Post by Roberto Lopez »

Mario Mansilla wrote: 1 - Do as I can do using the IDE to display the vertical scroll bar?
Horizontal and vertical scrollbars are automatic in Grid. They are shown when required.
Mario Mansilla wrote: 2 - I generally use the browse control because only show the database and edit in a separate form, but with the grid control I can not display the full horizontal bar, single field or field. Is it possible to do this?
I do not understand this one. Could be you so kind to explain in a different way?

TIA.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Mario Mansilla
Posts: 269
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

Re: Problemas con Grid

Post by Mario Mansilla »

Hola Roberto :
Necesito verlo asi .
Saludos .
Mario Mansilla
I need see
Attachments
Grid_Test.JPG
Grid_Test.JPG (30.36 KiB) Viewed 10155 times
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Problemas con Grid

Post by Roberto Lopez »

Mario Mansilla wrote:Hola Roberto :
Necesito verlo asi .
Saludos .
Mario Mansilla
I need see
La barra de desplazamiento vertical aparecerá cuando tengas más filas de las que puede mostrar Grid.

Para que no aparezca la barra de desplazamiento horizontal (que también es automática) el ancho total de las columnas debe ser menor al ancho del Grid.

The vertical scroll bar will appear when you have more rows than Grid can display.

To hide horizontal scroll bar (which is also automatic) the total width of the columns must be less than the width of the Grid.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Mario Mansilla
Posts: 269
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

Re: Problemas con Grid

Post by Mario Mansilla »

Hola Roberto :
Quizas no me expreso bien , pero ahora en la figura te muestro como quiero que se vea la barra horizontal , en el control grid solo veo en azul el campo a editar y los demas en gris claro .

Hola Roberto:
Maybe not express myself well, but now the figure I show you how I want to display the horizontal bar in the grid control only see blue editing field and the other in gray.
Attachments
Grid_Test_1.JPG
Grid_Test_1.JPG (30.97 KiB) Viewed 10147 times
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Problemas con Grid

Post by Roberto Lopez »

Mario Mansilla wrote:Hola Roberto :
Quizas no me expreso bien , pero ahora en la figura te muestro como quiero que se vea la barra horizontal , en el control grid solo veo en azul el campo a editar y los demas en gris claro .

Hola Roberto:
Maybe not express myself well, but now the figure I show you how I want to display the horizontal bar in the grid control only see blue editing field and the other in gray.
Ok. I've understood now.

Data-bound Grid, at the moment allows cell navigation only, so it's not possible show the entire row in blue, but you could change the default gray. The value is in h_grid.prg.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Mario Mansilla
Posts: 269
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

Re: Problemas con Grid

Post by Mario Mansilla »

Ok Roberto , si el control grid solo por el momento funciona de esta manera , para no modificar el prg prefiero seguir con el viejo y querido control browse hasta que esto sea contemplado en el control grid , ya que como muestro en el ejemplo nunca edito en las celdas , siempre lo hago en controles separados ya sea en el mismo form o bien en otro separado a tal efecto .
Saludos cordiales y muchas gracias por tu continuo esfuerzo .
Mario Mansilla

Ok Roberto, if the grid control at the moment only works this way, not to modify the prg prefer to continue with the good old browse control until this is provided in the grid control, since, as shown in the example will never edit in cells, always do in either separate controls in the same form or in another separate to that effect.
Best Regards and thank you very much for your continued effort.
Mario Mansilla
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Problemas con Grid

Post by Roberto Lopez »

Mario Mansilla wrote:Ok Roberto , si el control grid solo por el momento funciona de esta manera , para no modificar el prg prefiero seguir con el viejo y querido control browse hasta que esto sea contemplado en el control grid , ya que como muestro en el ejemplo nunca edito en las celdas , siempre lo hago en controles separados ya sea en el mismo form o bien en otro separado a tal efecto .
Saludos cordiales y muchas gracias por tu continuo esfuerzo .
Mario Mansilla

Ok Roberto, if the grid control at the moment only works this way, not to modify the prg prefer to continue with the good old browse control until this is provided in the grid control, since, as shown in the example will never edit in cells, always do in either separate controls in the same form or in another separate to that effect.
Best Regards and thank you very much for your continued effort.
Mario Mansilla
I'm not thinking on change that.

This is the reason because the current cell is highlighted and the rest of the row too.

So, if you do not like the light gray I've used as default for current row, you can change to look exactly the same as the current cell, changing its color from h_init.prg (lines #620 to 624):

Code: Select all

	* _HMG_SYSDATA [ 348 ] -> Grid Selected Row ForeColor (by cell navigation)
	* _HMG_SYSDATA [ 349 ] -> Grid Selected Row BackColor (by cell navigation)
	* _HMG_SYSDATA [ 350 ] -> Grid Selected Cell ForeColor (by cell navigation)
	* _HMG_SYSDATA [ 351 ] -> Grid Selected Cell BackColor (by cell navigation)
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Mario Mansilla
Posts: 269
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

Re: Problemas con Grid

Post by Mario Mansilla »

Roberto : hice estos cambios y ahora si se la barra del control grid igual que el control browse .
Roberto: I made these changes and now when the control bar like the control grid browse.
Saludos y muchas gracias .
Mario Mansilla

_HMG_SYSDATA [ 348 ] := { GetRed ( GetSysColor (COLOR_HIGHLIGHTTEXT) ) , GetGreen ( GetSysColor ( COLOR_HIGHLIGHTTEXT) ) , GetBlue ( GetSysColor (COLOR_HIGHLIGHTTEXT) ) }
_HMG_SYSDATA [ 349 ] := { GetRed ( GetSysColor (COLOR_HIGHLIGHT) ) , GetGreen ( GetSysColor (COLOR_HIGHLIGHT ) ) , GetBlue ( GetSysColor (COLOR_HIGHLIGHT) ) }

_HMG_SYSDATA [ 350 ] := { GetRed ( GetSysColor (COLOR_HIGHLIGHTTEXT) ) , GetGreen ( GetSysColor ( COLOR_HIGHLIGHTTEXT) ) , GetBlue ( GetSysColor (COLOR_HIGHLIGHTTEXT) ) }
_HMG_SYSDATA [ 351 ] := { GetRed ( GetSysColor (COLOR_HIGHLIGHT) ) , GetGreen ( GetSysColor (COLOR_HIGHLIGHT ) ) , GetBlue ( GetSysColor (COLOR_HIGHLIGHT) ) }
Post Reply