belo Posted March 23, 2013 Posted March 23, 2013 How to increase Row Height of UniDBGrid? Example VCL: THackDBGrid (DBGrid1). RowHeights [0]: = 20; Quote
JasonReid Posted March 26, 2013 Posted March 26, 2013 How to increase Row Height of UniDBGrid? Example VCL: THackDBGrid (DBGrid1). RowHeights [0]: = 20; I think one of the demos shows how to do this : http://prime.fmsoft.net/demo/memoimage.dll Quote
belo Posted March 27, 2013 Author Posted March 27, 2013 I think one of the demos shows how to do this : http://prime.fmsoft.net/demo/memoimage.dll In this example only expands if you have a Memo. I need to do this manually because it is better for viewing on a tablet for example. Anyway, thanks for the tip. Quote
JasonReid Posted March 27, 2013 Posted March 27, 2013 In this example only expands if you have a Memo. I need to do this manually because it is better for viewing on a tablet for example. Anyway, thanks for the tip. Ahh .. I see what you mean..Be interesting to see if you can find a solution for this. There seems to be a way to do it with ExtJS but how to integrate it is another story. Quote
belo Posted March 28, 2013 Author Posted March 28, 2013 Ahh .. I see what you mean..Be interesting to see if you can find a solution for this. There seems to be a way to do it with ExtJS but how to integrate it is another story. Ok Jason! I'll see if I can implement. Thanks for the tip. Quote
rasaliad Posted March 29, 2013 Posted March 29, 2013 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 Quote
belo Posted March 29, 2013 Author Posted March 29, 2013 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? Quote
rasaliad Posted March 29, 2013 Posted March 29, 2013 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 Quote
belo Posted March 29, 2013 Author Posted March 29, 2013 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. Quote
rasaliad Posted March 30, 2013 Posted March 30, 2013 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 Quote
belo Posted March 30, 2013 Author Posted March 30, 2013 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 Quote
rasaliad Posted March 30, 2013 Posted March 30, 2013 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.