-
Posts
333 -
Joined
-
Last visited
-
Days Won
7
tappatappa last won the day on February 27 2017
tappatappa had the most liked content!
Profile Information
-
Gender
Male
-
Location
Italy
Recent Profile Visitors
1333 profile views
tappatappa's Achievements

Advanced Member (4/4)
21
Reputation
-
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).
-
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
-
wow, what a beautiful bell curve we got!
-
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.
-
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);
-
See the test case attached. TestUniImage.zip
-
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);
-
it seems exactly what I tried, only in Delphi
-
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?
-
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
-
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->SaveToStream(s); //ACCESS VIOLATION s->Position = 0; img->Picture->Graphic->LoadFromStream(s); Any help?
-
//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
-
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(HINSTANCE, HINSTANCE, LPSTR, int) {
-
TUniSpeedButton.Glyph, loading PNG results in "Invalid Graphic Format"
tappatappa replied to wprins's topic in General
Glyph doesn't work with PNG with Alpha Channel (transparency) -
TUniSpeedButton.Glyph, loading PNG results in "Invalid Graphic Format"
tappatappa replied to wprins's topic in General
It does work with TUniBitBtn, I use them a lot in my project. Do you need SpeedButton specifically?