Search Results

Search found 3 results on 1 pages for 'figus'.

Page 1/1 | 1 

  • How do you get Length of Text in a Mojo TextField?

    - by figus
    How do you get the length of the text inside a Mojo TextField? I'm trying to set a multiLine TextField with a limit of 150 chars, I tried doing it with a counter, but ran into a issue of not being able to decrement the counter when the text was erased, or adding the right number when pasting text, so my new approach was to get the length of the text each time you press a letter. I've already tried this: (gets called in the charsAllow attribute of the textField) if (this.controller.get("mensaje").mojo.getValue().length <= 150) { return true; } this.controller.get("mensaje").mojo.blur(); return false; but it doesn't work.... I debugged and the function exits just after the line in bold... it doesn't even returns true or false. I also tried assigning the length value to a variable or assigning the text to a variable and then get the length, but nothing. It's the same issue. It returns just after the getValue(). Also, maybe because of this issue, the text scrolls instead of wrapping, but when the textField loses focus it wraps the text.

    Read the article

  • Webbrowser locks first Excel Instance

    - by figus
    VB.NET 2008 - WinForms Hi Everyone! I've been looking for an answer to my problem but I only find more questions related to my problem... The thing is that I'm using a AxWebBrowser control in VB.NET 2008 to open a excel file in a WindowsForm, it opens succesfully and everything... but the problem is this: If I had a Excel File Open before opening another Excel File in my WebBrowser Control, the window that contains the file that was already open gets locked... (I can't give focus to that Excel window... If I click on it, the focus returns to my application) I tried creating a new excel instance with CreateObject("Excel.Application") just before loading the file, but the WebBrowser locks the first Excel Instance... Is there a way to lock it to the last instance??? I use the WebBrowser1.Navigate(Url) method to load the file... where Url is a String like C:\myExcelFile.xlsm WebBrowser1.Document.Application.UserControl is also True, but it get's locked. Any Suggestion?? Thanks in Advance!!!

    Read the article

  • Releasing Excel after using Interop

    - by figus
    Hi everyone I've read many post looking for my answer, but all are similar to this: http://stackoverflow.com/questions/1610743/reading-excel-files-in-vb-net-leaves-excel-process-hanging My problem is that I don't quit the app... The idea is this: If a User has Excel Open, if he has the file I'm interested in open... get that Excel instance and do whatever I want to do... But I don't to close his File after I'm done... I want him to keep working on it, the problem is that when he closes Excel... The process keeps running... and running... and running after the user closes Excel with the X button... this is how I try to do it This piece is used to know if he has Excel open, and in the For I check for the file name I'm interested in. Try oApp = GetObject(, "Excel.Application") libroAbierto = True For Each libro As Microsoft.Office.Interop.Excel.Workbook In oApp.Workbooks If libro.Name = EquipoASeccionIdSeccion.Text & ".xlsm" Then Exit Try End If Next libroAbierto = False Catch ex As Exception oApp = New Microsoft.Office.Interop.Excel.Application End Try here would be my code... if he hasn't Excel open, I create a new instance, open the file and everything else. My code ends with this: If Not libroAbierto Then libroSeccion.Close(SaveChanges:=True) oApp.Quit() Else oApp.UserControl = True libroSeccion.Save() End If System.Runtime.InteropServices.Marshal.FinalReleaseComObject(libroOriginal) System.Runtime.InteropServices.Marshal.FinalReleaseComObject(libroSeccion) System.Runtime.InteropServices.Marshal.FinalReleaseComObject(origen) System.Runtime.InteropServices.Marshal.FinalReleaseComObject(copiada) System.Runtime.InteropServices.Marshal.FinalReleaseComObject(oApp) libroOriginal = Nothing libroSeccion = Nothing oApp = Nothing origen = Nothing copiada = Nothing nuevosGuardados = True So you can see that, if I opened the file, I call oApp.Quit() and everything else and the Excel Process ends after a few seconds (maybe 5 aprox.) BUT if I mean the user to keep the file open (not calling Quit()), Excel process keeps running after the user closes Excel with the X button. Is there any way to do what I try to do?? Control a open instance of excel and releasing everything so when the user closes it with the X button, the Excel Process dies normally??? Thanks!!!

    Read the article

1