mika Posted January 9, 2015 Posted January 9, 2015 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. Quote
Sherzod Posted January 9, 2015 Posted January 9, 2015 Hi, Try: http://stackoverflow.com/questions/15843473/extjs-label-orientation http://jsfiddle.net/H5h7D/ http://try.sencha.com/extjs/4.0.7/examples/draw/rotatetext/viewer.html Best regards. Quote
mika Posted January 9, 2015 Author Posted January 9, 2015 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. Quote
mika Posted January 12, 2015 Author Posted January 12, 2015 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. Quote
Sherzod Posted January 12, 2015 Posted January 12, 2015 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. Quote
mika Posted January 12, 2015 Author Posted January 12, 2015 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. Quote
mika Posted January 12, 2015 Author Posted January 12, 2015 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? Quote
mika Posted January 12, 2015 Author Posted January 12, 2015 So... there really isn't any information about this subject? Quote
mika Posted January 14, 2015 Author Posted January 14, 2015 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. Quote
JeffBr Posted January 26, 2015 Posted January 26, 2015 I am in need of the same thing. Do you have any example draws angles label ? Thanks Quote
mika Posted February 3, 2015 Author Posted February 3, 2015 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. Quote
artem_niko Posted January 16, 2025 Posted January 16, 2025 Good afternoon! And how can I rotate/tilt, for example, a UniPanel, at a certain angle? Say 45 degrees, etc. Quote
Sherzod Posted January 16, 2025 Posted January 16, 2025 Hello, What for and what should it look like? Quote
artem_niko Posted January 16, 2025 Posted January 16, 2025 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: 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: Quote
Sherzod Posted January 17, 2025 Posted January 17, 2025 20 hours ago, artem_niko said: And how can I rotate Quote
Sherzod Posted January 17, 2025 Posted January 17, 2025 procedure TMainForm.UniFormCreate(Sender: TObject); begin UniPanel1.JSInterface.JSConfig('style', ['transform: rotate(25deg); transform-origin: center; margin: 50px auto']); end; Quote
artem_niko Posted January 17, 2025 Posted January 17, 2025 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? Quote
Sherzod Posted January 17, 2025 Posted January 17, 2025 12 minutes ago, artem_niko said: Maybe it is necessary to make some settings for the UniPanel itself? No, it is not necessary. Quote
artem_niko Posted January 17, 2025 Posted January 17, 2025 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. Quote
artem_niko Posted January 17, 2025 Posted January 17, 2025 1 hour ago, Sherzod said: Try to check it with a simple example. So I did it using a simple, empty example of the same project... Quote
Sherzod Posted January 17, 2025 Posted January 17, 2025 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? Quote
artem_niko Posted January 18, 2025 Posted January 18, 2025 14 hours ago, Sherzod said: If it still doesn't work, can you attach a test example here? This is my test simple project Новая папка (4).zip Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.