Jump to content

DBGrid RowHeights


belo

Recommended Posts

Hi Eduardo,

 

I solved this problem with a workaround, I need to increase the row height for use in mobile devices, then what i did was to add html tag <br> to add adicional lines, in my SQL statement i add the <br>, for example:

 

 

SELECT 

'<br>' + CodigoERP + '<br><br>' as CodigoERP, 

'<br>' + Descripcion + '<br><br>' as Descripcion

FROM fc_Localidades(0)

 

it work for my needs, i hope it help you

 

Rafael Liriano

Link to comment
Share on other sites

Hi Eduardo,

 

I solved this problem with a workaround, I need to increase the row height for use in mobile devices, then what i did was to add html tag <br> to add adicional lines, in my SQL statement i add the <br>, for example:

 

 

SELECT 

'<br>' + CodigoERP + '<br><br>' as CodigoERP, 

'<br>' + Descripcion + '<br><br>' as Descripcion

FROM fc_Localidades(0)

 

it work for my needs, i hope it help you

 

Rafael Liriano

Great idea Rafael!

But this does not work in Firebird SQL.

What database are you using?

Link to comment
Share on other sites

Hi Eduardo

 

Is correct for firebird is different (i'm using sqlserver), for firebird, to concatenate string you need to use the pipe (||), not the plus (+) sign. Is like this:

 

 SELECT 

'<br><span style="line-height: 1.0">' || CodigoERP || '</span><br>' as CodigoERP, 

'<br><span style="line-height: 1.0">' || Descripcion || '</span><br>' as Descripcion

FROM fc_Localidades(0)

 

Now in this example i use the <span style="line-height: 1.0">, because i increase the font to 18 pixel, and when the text was very long, it wordwarp and was overlaping, now with this style it look fine. (sorry for my English).

 

Regards,

 

Rafael Liriano

Link to comment
Share on other sites

Hi Eduardo

 

Is correct for firebird is different (i'm using sqlserver), for firebird, to concatenate string you need to use the pipe (||), not the plus (+) sign. Is like this:

 

 SELECT 

'<br><span style="line-height: 1.0">' || CodigoERP || '</span><br>' as CodigoERP, 

'<br><span style="line-height: 1.0">' || Descripcion || '</span><br>' as Descripcion

FROM fc_Localidades(0)

 

Now in this example i use the <span style="line-height: 1.0">, because i increase the font to 18 pixel, and when the text was very long, it wordwarp and was overlaping, now with this style it look fine. (sorry for my English).

 

Regards,

 

Rafael Liriano

 

 

Yeah! Now yes it worked.
 
Good job Rafael.
 
Thanks for the help.
Link to comment
Share on other sites

Hi Eduardo,

 

Is good to know that it is working, because i'm developing an application to be using in mobile world and i'm having all kind of cases.

 

Now let me know you, that i think it is better to add the html tag, in the field OnGetText event instead in the SQL Command, because if you need to use the SQL Field value. 

 

The OnGetText event is in the field, you can access to it in the dataset fields editor, select the field you want and in the object inspector yo have the OnGetText event, and do the following:

 

 

 

procedure TfrCapturaFrame.qrListaCODIGOERPGetText(Sender: TField;
  var Text: string; DisplayText: Boolean);
begin
  Text := '<br><span style="line-height: 1.0">' + Sender.AsString + '</span><br>';
end;

 

Regards,
 
Rafael Liriano
Link to comment
Share on other sites

 

Hi Eduardo,

 

Is good to know that it is working, because i'm developing an application to be using in mobile world and i'm having all kind of cases.

 

Now let me know you, that i think it is better to add the html tag, in the field OnGetText event instead in the SQL Command, because if you need to use the SQL Field value. 

 

The OnGetText event is in the field, you can access to it in the dataset fields editor, select the field you want and in the object inspector yo have the OnGetText event, and do the following:

 

 

 

Regards,
 
Rafael Liriano

 

 

 

Hi Rafael,
 
In fact, it is much better using the GetText.
 
I'm developing an application for Tablet 7 "and 10" is very complicated and adjust the layout.
As the height of the row of DBGrid, would also like to find a solution to the height of UniEdit to improve editing.
Have you got something to adjust the Height of Edit for mobile applications?
 
Regards,
 
Eduardo Belo
Link to comment
Share on other sites

Eduardo,

 

For the height of UniEdit what i did was to change the font to 18 pixel, and it is doing well in my devices, i am testing with an Intermec CN70 with resolution 480x640 and a nexus 7". I also use the anchors to to adjust the layout and is doing very well.

 

Regards,

 

Rafael Liriano 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...