Jump to content

tappatappa

uniGUI Subscriber
  • Content Count

    333
  • Joined

  • Last visited

  • Days Won

    7

tappatappa last won the day on February 27 2017

tappatappa had the most liked content!

Community Reputation

21 Excellent

About tappatappa

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    Italy

Recent Profile Visitors

607 profile views
  1. I'd use Sleep() for debugging purposes only. You should test whether it hangs the whole server or not (call a long Sleep and open a new connection on a separate window).
  2. I tried do put <img src='path/to/img.png'/> before each element, and only got partial results: the elements in the list got the correct images but the selected one appears with the html text
  3. wow, what a beautiful bell curve we got!
  4. I got O553.setEmptyText is not a function the other approarch you suggest seems to work, thanks! Edit: here is the code that I am using right now if(!_empty_txt_set) { UniSession()->AddJS(UnicodeString().sprintf(L"%s.view.emptyText='<div class=\"x-grid-empty\">NO RESULT</div>';%s.getView().refresh();", grid->JSName, grid->JSName); _empty_txt_set = true; } so it uses the same div class as a EmptyText. I had to use a boolean because the Server side uniDBGrid still has an empty EmptyText.
  5. Hi, I am trying to set a DBGrid EmptyText at run time, if(MainDBGrid->EmptyText.IsEmpty()) { MainDBGrid->EmptyText = "NO RECORD"; } MainQuery->Open(); but I get this Ajax error message O553.applyEmptyText is not a function I also tried to inject javascript directly, but the result is the same UniSession->AddJS(UnicodeString().sprintf(L"%s.emptyText = '%s'; %s.applyEmptyText();", MainDBGrid->JSName, UnicodeString(L"NO RECORD"), MainDBGrid->JSName);
  6. See the test case attached. TestUniImage.zip
  7. Let me clarify: The line ImgList->GetPng(img_cache.index, p); Is only a cut and paste error. It wass supposed to be ImgList->GetPng(0, p);
  8. it seems exactly what I tried, only in Delphi
  9. I started coding with Embarcadero RAD Studio when I was about 25 years old. I am now 30. But I rarely code in Delphi, I am more a C++ Builder guy. Does it count?
  10. Hi Delphi Developer, Thanks for the link. I tried this TPngImage* p = new TPngImage(); try { ImgList->GetPng(img_cache.index, p); p->Transparent = true; img->Picture->Graphic->Assign(p); } __finally { delete p; } And it kinda works. The only problem is that the pictures lose transparency, they get a black background. P.S. All the images I use are png
  11. Is it possible to "copy" an Image loaded in a TUniNativeImageList into a TUniImage? I tried several approaches, with no luck. img->Picture->Graphic->LoadFromStream(ImgList->Images[0]->MemoryImage); //ACCESS VIOLATION Or TMemoryStream* s = new TMemoryStream(); TNativeImageRecord* img_rec = ImgList->Images[0]; img_rec->MemoryImage->SaveToStream(s); //ACCESS VIOLATION s->Position = 0; img->Picture->Graphic->LoadFromStream(s); Or TMemoryStream* s = new TMemoryStream(); TNativeImageRecord* img_rec = ImgList->Images[0]; img_rec->Graphic->S
  12. //Delphi UniSession.AddJS(unicanvas.JSName + '._cc_.fillText("'+text+'",'+left+','+top+');'); //C++ UnicodeString s = UnicodeString().sprintf(L"%s._cc_.fillText('%s',%d,%d);", unicanvas->JSName, text, left, top); UniSession()->AddJS(s); Of course, is better if you do some escaping of the text first, otherwise you will be open to injection
  13. in the main cpp file (the one with the name of the project) #include <UniGUIVars.hpp>//<---------THIS #include <vcl.h> USEFORM("MainModule.cpp", UniMainModule); /* TUniGUIMainModule: File Type */ USEFORM("ServerModule.cpp", UniServerModule); /* TUniGUIServerModule: File Type */ USEFORM("Main.cpp", MainForm); /* TUniForm: File Type */ //--------------------------------------------------------------------------- #pragma link "UniGUIVars.obj" //<---------THIS #pragma TestProject //--------------------------------------------------------------------------- WINAPI WinMain(
  14. Glyph doesn't work with PNG with Alpha Channel (transparency)
  15. It does work with TUniBitBtn, I use them a lot in my project. Do you need SpeedButton specifically?
×
×
  • Create New...