-
Posts
929 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
Events
Posts posted by pro_imaj
-
-
56 minutes ago, Sherzod said:
Hello @pro_imaj
Do you have a simple testcase to reproduce?
Unfortunately, my main project has a black background.
When I create sample projects, it comes out with the same codes as you wrote.
Could it be caused by a setting on the servermodule or mainmodule side?
-
@Sherzod Hi
No matter what I do with the background color, the picture background is always saved as black. is there a solution for this?
-
1 hour ago, pro_imaj said:
Hi
When I run the code below, the code in line 2 works and closes the form, without SubmitData in line 1 working.
How do I get it to work sorted in Unigui?
UniCanvas1.SubmitData;
TuniForm(Owner).Close;I fixed the problem by adding the form close function to the end of the UniCanvas1AfterSubmit event.
-
Hi
When I run the code below, the code in line 2 works and closes the form, without SubmitData in line 1 working.
How do I get it to work sorted in Unigui?
UniCanvas1.SubmitData;
TuniForm(Owner).Close; -
20 hours ago, Ron said:
Konturu kırmızı yapmak için bu JS'yi kullanın:
Veya Delphi'den:
- Thanks. @Ron
-
10 hours ago, Ron said:
By adding these lines you can export the canvas data to the server:
uses NetEncoding; procedure TMainForm.UniButton1Click(Sender: TObject); begin uniSession.AddJS('ajaxRequest(MainForm.form, [''export''], { data: canvas.toDataURL() } );'); end; procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var inStream, outStream:TStringStream; begin if sameText(eventName,'export') then begin inStream:=TStringStream.Create; outStream:=TStringStream.Create; inStream.writeString(params.Values['data']); inStream.position:=22; TNetEncoding.Base64.Decode(inStream, outStream); outStream.position:=0; uniImage1.Picture.LoadFromStream(outStream); uniImage1.Picture.SaveToFile('image.png'); inStream.Free; outStream.Free; end; end;
Update: moved beginPath and closePath to mouseDown and mouseUp, for more fluid drawing.
For clearing the canvas use:
uniSession.AddJS('ctx.clearRect(0, 0, canvas.width, canvas.height);');
Hi @Ron,
Reply, thank you for the example, I appreciate it.
In this example, since the user can use different colors while drawing, everything on the screen changes when I change the Color, how can I change the color without wiping the screen?
What I'm doing is briefly HTMLFrame.HTML.Text := memBlack.Text;
I have attached an example. -
5 hours ago, Ron said:
As long as you do not need mouse move data, you can solve it all in Unigui. Like creating objects and placing them, or creating a line between two points, as you then only need to catch mousedown/up events.
But if you want to draw freehand lines, then you need mouse move data, which cannot be sent to the server as it is just too much, so it has to be solved in the client using JS.
Mouse move data is the red line, and if you do not need to cross it, things will be easier.
Is there a sample application on this subject has been done and shared before.
This is not the main topic of my project but I need something like this in some part.
-
6 minutes ago, Sherzod said:
Have you seen the related demos?
Yes I saw. I reviewed the "Canvas" example.
I have seen people who have worked with java script libraries such as http://fabricjs.com/ in the forum, but I did not get any results, I am writing in case there is someone who can produce such a solution.
-
5 hours ago, Sherzod said:
Hello,
How about a demo example that uses canvas?
It would be very useful, if you know anything, I would be very happy if you share it.
*I reviewed Unigui's own demos.
i want to do
-Drawing in different colors
-Adding some simple shapes
-Add and scale images
-Save the action as a picture -
Hi,
I want to make something like Paint that will allow the user to draw freely with Unigui, I searched in the forum but I couldn't find the right examples.
There are also professional Javascript libraries adapted to Unigui.
Thank you.
-
Any progress on this?
I'm about to go crazy 😇 -
Hi,
I think you need to edit the componet regarding this issue. This issue has taken me 2 days and still not resolved.
-
Hi,
The UniDBTagField object needs to have a ListSource property.
When I manually add data to the Item field of the UniDBTagField object at design time, it works fine,
However, when creating a form in the code part, when I fill it with a loop or fill it with a button, unfortunately I cannot see the old information.
-
2 hours ago, Sherzod said:
Ok @pro_imaj Thank you.
We will check.
This problem may not be related to UniDBTagField, in the example I sent you, when I add UniDbCheckCombobox instead of UniDBTagField, there is no problem while recording and that blank screen does not appear, yes, but when I open it in edit mode, the relevant data does not appear.
It's as if the situation is related to a bug caused by unigui regarding my opening Frame in a Form.
-
16 hours ago, pro_imaj said:
Were you able to examine the sample
-
-
1 minute ago, Sherzod said:
Hi,
What database are you using? It would be nice if you could make a minimal testcase that shows your case.
I am using MSSQL, if it is suitable for you, I will do the work and send it to you as a script.
-
17 minutes ago, Sherzod said:
Are there any errors in the logs, in the browser console?
Hi @Sherzod
Unfortunately not, there is no problem with any log files or debug mode.
I'm sure there is a big bug in this component.Instead, I used UniDBCheckCombobox without changing any code and got the result without any problems.
Since the UniDbTag component is much more useful, I want to use it, otherwise I solved my problem with UniDBCheckCombobox.
-
@Sherzod I've been dealing with this problem for 2 days, I'm using it in the try except block, it seems that the database has been registered, but access to everything is stopped on the unigui side, if you can help me, I would be very grateful.
-
19 hours ago, Sherzod said:
How can we reproduce this issue?
I can give anydesk when you are available, I try all the ways, but the result is the same,
I cannot prepare a test case because there is a database connection.
-
12 minutes ago, pro_imaj said:
Also, there is a bug in UniDBTagField component and it affects the whole project.
If the user writes and saves anything that is not in the list, then no frame can be opened in the project, which is a very big problem.
After this event, when I try to open a frame in the Form, something like this appears.
A frame opens in a form that normally has the System Close button
-
Also, there is a bug in UniDBTagField component and it affects the whole project.
If the user writes and saves anything that is not in the list, then no frame can be opened in the project, which is a very big problem.
-
Hello,
I noticed that the UniDBTagField object has no FieldLabel properties, it needs to have it like all other objects, how do I solve this?
-
I found the source of the problem with CreateOrder;
When processing with CreateOrder, it should be started from 1, since I start from 0, edits are not positioned when 0 in all other objects.
This is not a definitive solution, normally it should have been resolved with TabControl.
Thanks for your help. @Sherzod
TUniCanvas Background Color
in General
Posted
@Sherzod
Yes, this works, I tried it while making a test case, but it doesn't work in my project, the background is always recorded as black in my project.😪