Jump to content

Recommended Posts

Posted

I need a label than can rotate and I haven't found such functionality in existing component(s). I suppose one could write own component based on TUniLabel; however, that doesn't seem to be as trivial as one might assume. Is there a way to do this and/or is there some documentation about internal workings of the existing controls?

 

This is pretty much last subject i'm testing before purchasing this great product. Possibility to write custom components quickly and effectively is quite important and I would very much like to resolve this as soon as possible.

 

Thank you in advance.

Posted

Thank you for that information. How to implement this behaviour in TUniLabel descendant; for example TUniAngleLabel? I would like component to behave just the way any other component would; ie. component is rotated in design time as well as in runtime.

Posted

I'm sorry to be little bit hasty but I really need this information. Without proper documentation it's nearly impossible to develope custom components that descend from existing UniGUI components.

 

I've been searching net, but so far I haven't found enough information about this subject. For example, if I create TUniLabel descendant, there isn't public property canvas to be used. Also, I don't know what is proper way to create necessary JavaScript code for component. And no, links to pure ExtJS JavaScript examples aren't going to help much.

 

Even though UniGUI is very good in itself, this problem and lack of information may very well be deal breaker for us.

Posted
Hi,

 

Sorry, can you clarify once again the component, that you want to create ?! Are there any examples on the Internet, should look like this component? ...

 

Best regards.
Posted

I need to create label component which would have angle property. Component should be TUniLabel descendant and it should be able to display rotated text. I know that this can be accomlished using JS only but I need to create component for it because it's mandatory to be able to see this same behaviour in design time as well as run time.

Posted

Well, you would think so. However, there aren't public property canvas to be used to draw anything in designtime. Also, how should i use JavaScript to create component in runtime?

Posted

I finally managed to create component which draws angled label. How can I update properties of created ExtControl? For example, I need to update control when components angle property is changed.

  • 2 weeks later...
Posted

I ditched server side solution completely and did it client side by using JavaScript/Ext. Not an ideal solution at all but it will do for now.

  • 9 years later...
Posted
7 minutes ago, Sherzod said:

Hello,

What for and what should it look like?

It's as simple as that...
there's some kind of UniPanel component:

image.png.16c2215fac994ebf29826ae1b9866baf.png

which I need to tilt by some angle, but so that the component is not "curved" and is equal, for example, how can this be done in the program Paint.net:

image.thumb.png.620e38ac7322819211ad3ee4e821096f.png

Posted
procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniPanel1.JSInterface.JSConfig('style', ['transform: rotate(25deg); transform-origin: center; margin: 50px auto']);
end;

 

Posted
1 hour ago, Sherzod said:
procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniPanel1.JSInterface.JSConfig('style', ['transform: rotate(25deg); transform-origin: center; margin: 50px auto']);
end;

 

Hmm, it's strange, I used the code above, but when starting a simple project, the panel does not tilt... Maybe it is necessary to make some settings for the UniPanel itself?

Posted
1 hour ago, Sherzod said:

No, it is not necessary.

Can you throw in your example where you made a turn? Maybe there's something wrong with my project after all, because it's not clear why my code doesn't work otherwise.

Posted
3 hours ago, artem_niko said:

So I did it using a simple, empty example of the same project...

If it still doesn't work, can you attach a test example here?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...