-
Posts
159 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Events
Posts posted by Fábio Matte
-
-
1 minute ago, picyka said:
Self.FGrid.Columns[i].Filtering.Editor
But at what point would I put this?
Because I would need to pass in my column 0, a filter, according to what I type in UniEdit.
FGrid.Columns.Items[0].Filtering.Editor := UniEdit;
But that doesn't work, it gives the same error returned in the error image I posted.
-
Hi,
I'm trying to put the Filtering.Editor option on dynamically created columns in a UniDBGrid, but it doesn't work at all, in all the ways I try, I get the message "Argument out of range" when running.Here is the code I used to apply the filter:
dbGridSQL_Resultado.Columns.Clear; if optControl = 1 then begin with dbGridSQL_Resultado do begin DataSource := dsFDMemTable; Columns.Items[0].Filtering.Editor := TUniEdit(Self.FindComponent('UniEdit1').Name); Columns.Items[0].Filtering.Enabled := True; end; end;
Image Error:
-
On 2/1/2016 at 5:45 AM, Sherzod said:
Hi,
If I understood you correctly, try:
UniDBGrid1 -> ClientEvents -> ExtEvents [Ext.data.Store[store] ] add store.load fn:
function store.load(sender, records, successful, eOpts) { sender.grid.columnManager.columns.forEach(function(col){col.autoSize()}) }
Best regards.
Excellent resource, it worked here for me, it was a lot of show.
-
Good morning, I ended up managing to put it like this:
lstInventario.ClientEvents.UniEvents.Values['beforeInit'] := myJSScript.Lines.Text;
I store what I need inside a memo, and from there I carry it where I need it.
Thanks.
-
10 hours ago, Sherzod said:
Hello,
Can you please clarify your question?
So, I need to add the code mentioned above in Properties: ClientEvents> UniEvents [Ext.dataview.List> beforeInit] of the UnimDBListGrid Component at Runtime (See Image) and not at design time, because the way it is here, added to the project , you are not attending me the way I need to.
-
How can I do to load the code below into a ClientEvents> UniEvents?
function beforeInit(sender, config) { config.loadingText='Carregando...'; config.grouped=true; config.selectedCls=''; var descr = '<table style="width: 100%; border-collapse: collapse; border-style: none; height: 10px;" border="0"> ' + '<tbody> ' + '<tr style="height: 10px;"> ' + '<td style="width: 9.33229%; height: 10px;"> ' + '<table style="height: 100%; width: 100%; border-collapse: collapse; border-style: hidden;" border="0" cellspacing="0" cellpadding="0"> ' + '<tbody> ' + '<tr> ' + '<td style="width: 100%;"><div class="circle"><img style="border-style: none; display: block; margin-left: auto; margin-right: auto;" src="ArquivosCliente/{7}/{6}/Fotos/Bens/thumbmail/{1}.jpg" onerror="this.src="http://wps.singus.com.br/html/img/singuslogo.png" alt="" width="50" height="55" </></div></td> ' + '</tr> ' + '</tbody> ' + '</table> ' + '</td> ' + '<td style="width: 90.6677%; height: 10px;"> '+ '<table style="width: 100%; border-collapse: collapse; border-style: hidden;" border="0" cellspacing="0" cellpadding="0"> '+ '<tbody> '+ '<tr> ' + '<td style="width: 100%;"><span style="font-size: 9px; padding-left: 5px;"><span style="font-family: tahoma,geneva,sans-serif;"><span style="color: #0000ff;"><strong>'+ 'TIPO: {0}</strong></span></span></span></td> '+ '</tr> '+ '<tr> ' + '<td style="width: 90%;"><span style="font-size: 9px; padding-left: 5px;"><span style="font-family: tahoma,geneva,sans-serif;"><span style="color: #ff0000;"><strong>{3}</strong></span></span></span></td> '+ '</tr> '+ '<tr> ' + '<td style="width: 100%;"><span style="font-size: 9px; padding-left: 5px;"><span style="font-family: tahoma,geneva,sans-serif;"><span style="color: #003300;"><strong>CHAPA ATUAL: {1} | CHAPA ANT.: {2}</strong></span></span></span></td> '+ '</tr> '+ '</tbody> '+ '</table> ' + '</td> ' + '</tr> ' + '</tbody> '+ '</table>'; config.itemTpl = new Ext.XTemplate(descr); }
-
On 2/6/2021 at 1:10 AM, 55143681 said:
with cbuilder works well:
UnimFileUploadButton1->JSInterface->JSAddListener("added", "function(sender){if (sender.labelElement){sender.labelElement.hide()}; if (sender.inputElement) {sender.inputElement.hide()}; fbtn=sender.getFileButton(); if (fbtn) {fbtn.setText(\"newText\"); fbtn.setWidth(sender.getWidth())};}");
with delphi works well:
UnimFileUploadButton1.JSInterface.JSAddListener('added', 'function(sender){if (sender.labelElement){sender.labelElement.hide()}; if (sender.inputElement) {sender.inputElement.hide()}; fbtn=sender.getFileButton(); if (fbtn) {fbtn.setText("newText"); fbtn.setWidth(sender.getWidth())};}');
Thank you friend,
It was even better using this code that you put here.It cost !!!
-
4 hours ago, fiorilli said:
Hello, after updating the unigui to version 1546 I am facing a problem with components that are released at run time, they do not disappear from the screen. sample code below:
i := 0;
while i < fAtendimento.ComponentCount do
begin
if (pos('frameComentarios', fAtendimento.Components[i].Name) > 0) or
(pos('frameHistoricos', fAtendimento.Components[i].Name) > 0) then
begin
fAtendimento.Components[i].Free;
i := i - 1;
end;
i := i + 1;
end;Obs. I already returned to version 1535 to test and the problem is really in 1546
The same happened to me, I had to go back to version 1545 to not have problems.
-
44 minutes ago, Hayri ASLAN said:
Can you send me the HTML?
This is the HTML I use in the Error templates:
<!DOCTYPE html> <html lang="pt-br"> <head> <link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900|RobotoDraft:400,100,300,500,700,900'> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'> <link rel="stylesheet" href="www/css/estilos.css" type="text/css"> <title class="msgerro">Patrimonio Web [Encerrado]</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <div class="wrapper"> <div class="titulo"> <img src="www/img/singuslogo_p.png" alt="Patrimonio Web" title="Patrimonio Web" width="350" height="150"/> <h1>Patrimonio Web</h1><span><a href=''>Sistema de Avaliação de Bens e Controle de Patrimonio</a></span> </div> <div class="msgerro"><p>[###message###]</p></div> <div class="reiniciarapp"><p><a href="[###url###]">Reiniciar Aplicação</a></p></div> </div> <footer> <div class="statusbar"> <div class="statusbarcentro"><span><a href="http://www.meusite.com.br" target="_blank">www.meusite.com.br</a></span></div> </div> </footer> </body> </html>
-
-
38 minutes ago, Hayri ASLAN said:
Hi
Is it working when you change from servermodule?
I'm using the same HTML in ServerModule and MainModule, even so it didn't work.
-
I put my HTML code in these properties but it doesn't return the personalized page.
The same thing I did in TerminateTemplate and it worked, but in ExceptionTemplate and InvalidSessionTemplate nothing happens.Note.: Doing this in MainModule
-
4 hours ago, Sherzod said:
You have to use XTemplate with a function.
I found this function here that I believe is a desire to give a Reload / Fresh of the image:
{ xtype: 'box', imageSrc : 'getImage.do', autoEl: {tag: 'img', height: 60, width: 205}, refreshMe : function(src){ var el; if(el = this.el){ el.dom.src = (src || this.imageSrc) + '?dc=' + new Date().getTime(); } } listeners : { render : function(){ this.refreshMe(); } } }
Or is Code:
var img = Ext.getCmp('img_a'); img.updateSrc('...'); // or img.setSrc('...'); Ext.create('Ext.Img', { src: 'http://redino.net/xxx.jpg?' + new Date().getTime() });
Note: But I have no idea how to use it.
But how can I use the code above implementing it in the code below:
function beforeInit(sender, config) { config.loadingText='Carregando...'; config.grouped=true; config.selectedCls=''; var descr = '<table style="width: 100%; border-collapse: collapse; border-style: none; height: 10px;" border="0"> ' + '<tbody> ' + '<tr style="height: 10px;"> ' + '<td style="width: 9.33229%; height: 10px;"> ' + '<table style="height: 100%; width: 100%; border-collapse: collapse; border-style: hidden;" border="0" cellspacing="0" cellpadding="0"> ' + '<tbody> ' + '<tr> ' + '<td style="width: 100%;"><div class="circle"><img style="border-style: none; display: block; margin-left: auto; margin-right: auto;" src="ArquivosCliente/{7}/{6}/Fotos/Bens/thumbmail/{1}.jpg" onerror="this.src="http://wps.singus.com.br/html/img/singuslogo.png" alt="" width="50" height="55" </></div></td> ' + '</tr> ' + '</tbody> ' + '</table> ' + '</td> ' + '<td style="width: 90.6677%; height: 10px;"> '+ '<table style="width: 100%; border-collapse: collapse; border-style: hidden;" border="0" cellspacing="0" cellpadding="0"> '+ '<tbody> '+ '<tr> ' + '<td style="width: 100%;"><span style="font-size: 11px; padding-left: 5px;"><span style="font-family: tahoma,geneva,sans-serif;"><span style="color: #0000ff;"><strong>'+ 'CODIGO: {0}</strong></span></span></span></td> '+ '</tr> '+ '<tr> ' + '<td style="width: 100%;"><span style="font-size: 11px; padding-left: 5px;"><span style="font-family: tahoma,geneva,sans-serif;"><span style="color: #ff0000;"><strong>{3}</strong></span></span></span></td> '+ '</tr> '+ '<tr> ' + '<td style="width: 100%;"><span style="font-size: 11px; padding-left: 5px;"><span style="font-family: tahoma,geneva,sans-serif;"><span style="color: #003300;"><strong>CHAPA ATUAL: {1} | CHAPA ANT.: {2}</strong></span></span></span></td> '+ '</tr> '+ '</tbody> '+ '</table> ' + '</td> ' + '</tr> ' + '</tbody> '+ '</table>'; config.itemTpl = new Ext.XTemplate(descr); }
-
2 hours ago, Sherzod said:
This is not correct...
And how could I do this correctly?
-
-
Solved with a conversion function.
function ConverteMiniatura(Imagem: TGraphic; W, H: Integer; vTransparente : Boolean; Tipo: TGraphicClass = nil): TGraphic; var B : TBitmap; jpg : TJPEGImage; LogFont : TLogFont; aFont : TFont; Rect1 : TRect; sText : string; lAltura, lLargura, lEsquerda, lDireita : Integer; vIncRect : Integer; ww, hh : Integer; newH, newW : Integer; X, Y : integer; Imagem2 : TGraphic; begin B := TBitmap.Create; try if imgW < imgH then begin newH := W; newW := H; end; if imgW > imgH then begin newH := H; newW := W; end; H := newH; W := newW; B.Height := H; B.Width := W; B.Transparent := vTransparente; B.Canvas.StretchDraw(Rect(0, 0, W, H), Imagem ); if Tipo = nil then Result := TGraphic(Imagem.ClassType.Create) else begin Result := Tipo.Create; Result.Assign(B); end; Try Jpg := TJPEGImage.Create; Jpg.Assign(B); Jpg.CompressionQuality := 100; jpg.Compress; Jpg.SaveToFile( PatchArquivosCliente + 'thumbmail\' + IntToStr( myChapa ) + '.jpg' ); Finally Jpg.Free; End; finally B.Free; end; end;
-
I have a UnimDBListGrid, in which I load some information using HTML via UniEvents, according to this code below:
Whatch line:
'<td style="width: 5.69044%; height: 43px;"><img src="ArquivosCliente/{7}/{6}/Fotos/Bens/thumbmail/{1}.jpg" alt="{3}" onerror="img/semimagem.jpg" width="50" height="50" /></td>' +
Full Code:
function beforeInit(sender, config) { config.loadingText='Carregando...'; config.grouped=true; config.selectedCls=''; config.disableCaching = true; config.itemTpl= ' <table style="border-collapse: collapse; width: 49.7724%; height: 43px;" border="0"; white-space: word-wrap:break-word>' + ' <tbody>' + ' <tr style="height: 63px;">' + '<td style="width: 5.69044%; height: 43px;"><img src="ArquivosCliente/{7}/{6}/Fotos/Bens/thumbmail/{1}.jpg" alt="{3}" onerror="img/semimagem.jpg" width="50" height="50" /></td>' + ' <td style="width: 94.3096%; height: 43px;">' + '<table style="width:100%;white-space: nowrap;vertical-align:middle;">'+ ' <tbody>' + ' <tr>' + '<td><span style="font-size:9px;padding-left:1px;"><span style="font-family:tahoma,geneva,sans-serif"><span style="color:#0000CD"><strong>CODIGO: {0}</strong></span></span></span></td>' + ' </tr>' + ' <tr>' + '<td><span style="color:#B22222"><span style="font-size:12px;padding-top:1px;padding-left:1px;"><span style="font-family:tahoma,geneva,sans-serif"><strong>{3}</strong></span></span></span></td>' + ' </tr>' + ' <tr>' + '<td><span style="color:#006400"><span style="font-size:12px;padding-top:1px;padding-left:1px;"><span style="font-family:tahoma,geneva,sans-serif"><strong>CHAPA ATUAL: {1} | CHAPA ANT.: {2}</strong></span></span></span></td>' + ' </tr>' + ' </tbody>' + ' </table>' + ' </td>' + ' </tr>' + ' </tbody></table>'; }
However, if I change the image on the server, the list is not shown with the new image, it is just loading the old one, even if I delete this image on the server, it continues to be displayed.So, how can I reload the image or not cache it !!!
Result:
-
When I upload an image using TUnimFileUpload, TUnimImage behaves perfectly by applying the "Proportional" Property correctly, however when I upload the same image using TUnimFileUploadButton, this property does not do what it should do, which is to display the image of proportionally.
How should I make this property behave correctly using TUnimFileUploadButton?
-
On 9/1/2019 at 8:01 AM, molla2005b said:
thank for your help
width not set but i fix it by this approach
with btnTakePhoto.JSInterface do begin JSConfig('border', ['false']); JSConfig('centered', ['true']); end;
It would be great if we had buttonOnly option
Good morning, where did you use this code?
I tried here, but it didn't work.Disregard, i managed to solve on account, OnCreate in Form or Frame:
with UnimFileUploadButton1.JSInterface do begin JSAddListener('added', 'function(sender){if (sender.labelElement){sender.labelElement.hide()}; if (sender.inputElement) {sender.inputElement.hide()}}'); JSAddListener('change', 'function(sender){getOrientation(sender.getFiles()[0], function(orientation) {ajaxRequest(sender, "getOrientation", ["orientation="+orientation])})}'); JSConfig('border', ['false']); JSConfig('centered', ['true']); end;
-
23 minutes ago, picyka said:
In the folder where the executable is
Friend, thanks for your tips.
It was the 02 things that made it work.1. Change the PatrimonioWeb.exe Patch
2. And give permission for the IIS user, >> IIS_IUSRS, to be able to perform operations on the newly created folder.Thank you very much, everything corrected.
- 1
-
1 minute ago, picyka said:
There is a permission error there too
But even if IIS I need to give permission ??
-
-
-
I've been trying to get a HyperServer server to work on IIS for hours, but I only get that An Exception has occured in application: No BinaryName is assigned. Please adjust "binary_name" parameter of your CFG file message, and I can't get out of it.
I set it up just like I did with other servers in IIS, but this one doesn't want to start correctly.
I send the files I'm using here.
How to set Filtering.Editor in UniDBGrid dynamically? [ Solved ]
in General
Posted
In fact, it's the way you suggested it to me, but I'm still wrong.
I do this by clicking on a Button, TUniButton.