Jump to content

mos

uniGUI Subscriber
  • Posts

    269
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by mos

  1. mos

    StringGrid Questions

    Hi Delphi Developer, Still waiting for some sort of update.
  2. mos

    StringGrid Questions

    Hi Delphi Developer, Any update?
  3. mos

    StringGrid Questions

    Hi Delphi Developer, I tried to create a TUniStringGrid in code and then used the JSCode lines you gave me but I get an Ajax Error. I have attached a sample test case. StringGrid2.zip
  4. mos

    StringGrid Questions

    Hi Delphi Developer, If I put some code to set the cell text before the two JSCode lines the cell colors appear correctly. with UniStringGrid1.JSInterface do begin UniStringGrid1.Cells[0,0] := 'test'; JSCode('var view, me='#1'; if(me.normalGrid) {view=me.normalGrid.getView()}else{view=me.getView()}; view.el.select("tr:nth(1) td:nth(1)").elements[0].style["background-color"]="green";'); JSCode('var view, me='#1'; if(me.normalGrid) {view=me.normalGrid.getView()}else{view=me.getView()}; view.el.select("tr:nth(1) td:nth(1)").elements[0].style["color"]="white";'); end; If I put the line after the two JSCode lines the cells don't have the colors applied. Is there a reason why the colors are not applied if the UniStringGrid1.Cells[0,0] := 'test'; is after the two JSCode lines?
  5. mos

    StringGrid Questions

    Hi Delphi Developer, Attached is a test case that generates the Ajax error. StringGrid.zip
  6. mos

    StringGrid Questions

    Hi Delphi Developer, Build 1413.
  7. mos

    StringGrid Questions

    Hi Delphi Developer, I seem to be getting some sort of Ajax error. See attached screenshot.
  8. mos

    StringGrid Questions

    Hi Delphi Developer, FixedCols is set to 0.
  9. mos

    StringGrid Questions

    Bumping this one again. Any further updates on the items above specifically item 1 and 4?
  10. mos

    StringGrid Questions

    Just bumping this. Also I have another question: 4. How can I update the UniCellAttribs of a cell without using OnDrawCell event? e.g. I have a timer which runs and I want to update a particular Cell background color based on a certain condition.
  11. Finally worked it out myself... I could use window.open() passing the value in href as the 1st parameter, and then sending the js code back to the browser... script_ := 'window.open(' + '''' + 'protocol-handler:' + getFullUrl(audioUrl, '/') + '''' + ',' + '''' + '_self' + '''' + ')'; uniSession.AddJS(script_);
  12. I have an application that allows a user to login and listen to recordings. The recordings themselves are stored in an encrypted format for content and security reasons. To play a recording, the user selects the recording from a grid, and then clicks on the button to play a recording. The web server will decrypt the selected recording into a file in users temporary cache, and that file is the referenced in the html 5 audio player. I have posted a couple of messages about playing and seeking functions in audio files when a user run a Chrome brower. The range of options the program gives a user now includes (option 1) uses flash player, which depending on who you believe is getting phased out and (option 2) if option set, runs external program to play the recording using anchor tag. The principle here is similar to that of the "tel" protocol, except that we have own protocol handler which run the windows media player and passing reference to the decrypted recording as a URL. In (option 2) the program has to decrypt on the fly, for this to work, a form is presented to the user with instructions and all the user has to do is click on the hyperlink <a href="our-protocol-handler:wmplayer.exe + link to temporary file">OfficeWebRun</a> and playing starts (the protocol handles take the arguments received and determines the actions to take). Of course, the above is not needed on other web browsers, as they can also use html 5 audio controls and seek within a file. This is all needed just for users with Chrome. Today I have been asked... "Can we run the program directly without needing to display the the player message and users needing to click the additional link?" Given the steps that occur between the selecting the file and the actual playing, I was wondering of it were possible to use the UniGUIServerModuleHTTPCommand or UniGUIServerModuleHTTPDocument, which... if they knew the request was to play a recording, the program would be able to decrypt file A into unencrypted file B and send B to back to the user instead of A. If this is possible, are there any unigui demo program that receives GET request for file A and user is sent audio file B instead? My questions are: 1. Is what I describe in the last paragraph possible? 2. If so, which event handler to use? UniGUIServerModuleHTTPCommand or UniGUIServerModuleHTTPDocument? 3. How would the response be formatted so that file B is sent rather then the original file A requested. Thanks
  13. I have a number of questions: Is there a way of preventing the user from resizing the column below a minimum column width value so that the column is always visible? Is it possible to drag and drop columns to change the ordering of the columns in the grid? How can rows be sorted in ascending/descending order based on the column that is clicked? I have seen sorting code based on the VCL stringgrid which uses the Rows property and a temporary TStringList to perform the exchanging of the rows however the uniGUI stringgrid does not have this property.
  14. Hi Delphi Developer, I think I know why it occurs in my browser. It is because I have a FireFox 57 extension which is visible down the bottom of the page ie. in my case it's FoxClocks and it occupies the bottom part of the browser window. So it looks like it's not a UniGui issue.
  15. Hi Delphi Developer, Attached is a test project. Project.zip
  16. Hi Delphi Developer, I have attached a screenshot that will illustrate my issue.
  17. I have TUniButton which I have aligned to the bottom of a form. When I maximize the form (MainForm.WindowState = wsMaximized) part of the bottom of the form is hidden by the FireFox status bar which makes only half of the button visible. Is there a way of maximizing the form so the button is fully visible?
  18. A customer has developed a small program that implements a protocol and that program needs to receive a full url to the a file in the cache folder... 'http://70.60.ZZZ.XXX:8077' + audioUrl where 'audioUrl' is the file to be downloaded from /cache/... code wise, I can build most of the URL with url := 'http'; if UniServerModule.SSLEnabled then url := url + 's'; {how to get the host part programatically?!?} url := url + ':' + intToStr(UniServerModule.Port); url := url + audioUrl; my worst case scenari is to have the user define this somewhere as an attribute which would used something like url := config.url + ':' + intToStr(UniServerModule.Port); url := url + audioUrl; where config.url is a function that reads a value from the database, but in the case of the above example would return http://70.60.ZZZ.XXX Is there some property that contains the host part of the url? Thanks.
  19. Hi Delphi Developer, Attached is a test case. Project.zip
  20. Hi Delphi Developer, I am trying to setup some columns in a stringgrid dynamically. The ColCount value I had setup at design time was 5. I tried to change the ColCount to 20 in code and then set the captions but get an Ajax Error: O13.columnManager.getColumns(...)[5] is undefined What I do notice when this error is display is that the grid only shows the 5 columns and not the 20. Here is some sample code that I have been testing with. procedure TMainForm.UniButton2Click(Sender: TObject); const TitleJS = 'columnManager.getColumns()[%d].setText'; TitleJS2 = '''' + '%s' + ''''; var liX: Integer; begin UniStringGrid1.ColCount := 20; for liX := 0 to 10 do begin UniStringGrid1.Columns.Add; UniStringGrid1.Columns[liX].Width := 60; UniStringGrid1.JSInterface.JSCall(format(TitleJS,[liX, TitleJS]), format(TitleJS2,['Hello There'])); end; end;
  21. The TUniTreeView doesn't have any of the VCL TreeView sorting options such as CustomSort or OnCompare. I am actually after the functionality of CustomSort which allows you to sort to a particular level. Will this functionality be added in a future release?
  22. Hi Delphi Developer, I have decided to use a different JQuery plugin https://www.jqueryscript.net/text/Versatile-Responsive-Text-Truncation-Plugin-For-jQuery-Truncate-js.html As the output from this one was exactly what I wanted. I changed the code you gave me above to: UniLabel1.JSInterface.JSCode('Ext.defer(function(){$($("#"+'#1'.id)[0]).truncate({lines:2})},50);'); However this didn't work. Can you see why the above code doesn't work for the new plugin?
  23. Do I have to send a demo program?
×
×
  • Create New...