Jump to content

tappatappa

uniGUI Subscriber
  • Posts

    333
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by tappatappa

  1. Ok I tested it and I confirm that it works. So, this ....beforeInit... Ext.override(Ext.DatePicker, { //....stuff is it altering this particular instance, or does it change Ext.DatePicker globally?
  2. Yes! Thanks again Delphi Developer, you are a hero!
  3. The day highlight is just what I needed, thank you. I ported the code to my project and it works. I noticed something odd with the addition of // add this: Ext.defer(function() { me.fireEvent("select"); }, 200); It does fix the month change, but the regular day click fires twice, and when the component is first rendered also it fires the event multiple times. Problem is I don't know what the snippet does, since I am quite an ExtJS newbie, so I am not capable of fixing it. Can you confirm this?
  4. Ok that looks very promising. If I call JSAddListener multiple times, do the events cancel out? If not: How can I remove all the mouseover events added that way?
  5. Finally I had a chance to test your code. It works great! I have two questions: 1) procedure TMainForm.HighlightDatesPush(ADt: TDate; ATitle: string); what is the point of the string "Title"? In my code I removed it from server side and from JS and the days are still highlighted as expected. Is it the content of the tooltip when the user moves the mouse over the day? 2) In my project I actually load the days in blocks, so my procedure looks something like void TForm1::highlightDates(std::vector<TDateTime>& dt_vec) { for (size_t i = 0; i < dt_vec.size(); ++i) { UniSession->AddJS(.......); } } is there a way to shrink the js code instead of making n calls to highlightDates.push(...); picker.update()? something like picker.items.items[0].highlightDates.push(___vector_of_dates___); picker.items.items[0].update(....)
  6. Hi Delphi Developer, I am afraid that in my case using ajax events is not an option. I have to use tiny javascript-only events (where possible), in order to keep network usage to a reasonable level.
  7. I am guessing whether is it possible to add a ClientEvent AFTER the component construction and render. For instance: add (or remove) a mouseover effect to a panel after the user clicks on a button. void __fastcall TForm1::ButtonClick(TObject* Sender) { Panel1->ClientEvents->ExtEvents->Values[L"mouseover"]=A_FUNCTION_BODY; }
  8. Hi, Farshad thanks for the tip, but what does it mean? And why did you put that annotation in the first place? I don't want to break the CSS with a bg color!
  9. I need to change the background color and font color of popupmenu, mainmenu etc components. I thought it would be sufficient to do this CustomCSS: .x-menu-body { background: #FFFFFF; color: #809CA7; } But this doesn't change a thing. I have found this code in uni_win10 css .x-menu-body{ border-radius:"1px"; border-width:"1px"!important; border-style:"solid"; border-left-color:#ccc; border-top-color:#ccc; border-right-color:#ccc; border-bottom-color:#ccc; background:white; background:#f0f0f0!important } i am guessing that the !important is preventing me from overriding the background color.
  10. In order to make the stringToComponent work you need to register the class you want to deserialize http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/Classes_RegisterClass.html
  11. If "cloning" the visual components is sufficient you can try serializing/deserializing the frame. If you need to preserve the data (and non-visual components, i.e. datasets) you need to to it by hand, and it may be very hard. For serializing the components see http://docwiki.embarcadero.com/CodeExamples/Berlin/en/ComponentToString_(Delphi) Beware, this process is possible only in Delphi. I tried in C++ and never succeeded.
  12. If you are using the Trial edition, then only default theme for you http://forums.unigui.com/index.php?/topic/7376-themes-in-unigui/?hl=theme If you have the full edition then there is a separate theme pack that needs to be installed (~1.4MB exe) along the develop or runtime package. Basically it unpacks additional CSS, for what I reckon.
  13. I see that with the v1.0 coming out features request (2-4) are not likely to be processed, still I'd appreciate an input for point 1. Please
  14. TUniCalendar: 1) Highlight specific days (for example: holidays, events etc..) during rendering, or (even better) dynamically, like the events on a calendarpanel 2) [bug/Missing Feature?] Change the Date attribute on month/year change: the "select" and "click" events are triggered only when the user clicks on a cell (a day), while visually the day does change example: Date is Today 18 Oct 2016, the user clicks on the right arrow (next month), the component shows "18 November 2016" but server-side Date is still 18/10 until the user clicks on "18", then it updates to 18/11. This is confusing for the user, and we received more than one complaint for this. I did some research, this seems to be an ExtJS issue. 3) [Feature Request] Resizing the component. At run time the Calendar is completely different from what I see in the IDE and it stays the same, is it immutable? 4) [Feature Request] Switch to compact/week view, something like this __________________________________ | < October 2016 > | ///change month | < M T W T F S S > | ///change week | 17 18 19 20 21 22 23 | ///select day |_________________________________|
  15. Hello, what I meant by "change the view" was "change the calendar style" from "month view" to "week view" etc
  16. If you want to do scroll inside the panel yes, you have to do as you say. It may be sufficient to put a scrollbox inside a scrollbox (without the panel). Beware it may result in a confusing interface. ------------^^ scrollbox2 || (alTop) || 2 scrollbars || ------------v| scrollbox1 | (container) | -------------v Let me explain one thing (sorry if it is obvious) By default, the scrollbars appear if any object directly inside (1 level!) the scrollbox exceeds the boundaries of the scrollbox. So if you have a 10x10 panel inside a 20x20 scrollbox, any object you put in the panel will not make the bars appear. TUniForm TUniScrollBox align: alClient height: 20 width: 20 TUniPanel <====panel does not exceed boundaries, no scrollbars align: alNone top: 0 left: 0 height: 10 width: 10 TUniLabel <====it doesn't matter if the object is in [150,150], the scrollbox doesn't "see" it top: 150 left: 150 If you remove the panel..... TUniForm TUniScrollBox align: alClient height: 20 width: 20 TUniLabel <==== now you have bars top: 150 left: 150
  17. what do you mean? TUniForm height 100 width 100 TUniScrollBox align: alClient TUniPanel align: alNone height 200 width 50 You should see scrollbars. Of course if the panel has "align: alClient" you won't see any scrollbars, as the panel height and width will change accordingly.
  18. The same thing I do. By default forms do not have scrollbars. If you like you can do a "Base Form" with a scrollbox and then when you want to define a new TUniForm you inherit from your Base Form instead (via New>>Inheritable items)
  19. I'm not really sure of the last 3 lines of your code. The OnDrawColumnCell allows you to work on one column at a time OnDrawColumnCell(TObject Sender, int ACol, int ARow, TUniDBGridColumn Column, TUniCellAttribs Attribs)
  20. I have put a TUniDBText inside a resizable TUniPanel (panel + splitter). The query is something like this select '<table width="100%" border="0">' ||'<tr>' ||'<td><font size="3" face="Calibri,Arial"><b>'||SURNAME||' '||NAME||'</b></font></td>' ||'<td align="right"><font size="2" color="gray" face="Consolas,Courier New">'||AGE||' Years old</font></td>' ||'</tr>' ||'<tr>' ||'<td colspan = "2"><font size="3" face="Calibri,Arial">'||DESCRIPTION||'</font></td>' ||'</tr>' ||'</table>' name from my_table x So, for instance, it can produce an HTML like <table width="100%" border="0"> <tr> <td><font size="3" face="Calibri,Arial"><b>John Smith</b></font></td> <td align="right"><font size="2" color="gray" face="Consolas,Courier New">50 Years old</font></td> </tr> <tr> <td colspan = "2"><font size="3" face="Calibri,Arial">Nice guy!</font></td> </tr> </table> the dbtext component is configured as follows Align = alTop TextConversion=txtHTML while its container Align = alLeft and the splitter Align = alLeft As you can see the AGE is right-aligned, so as I resize the panel to the right I expect to see the table to fit the entire panel, but instead it stays aligned to the left. If I put the same HTML table in a DBHTMLMemo it works as expected but the component is super heavy and overkill for my purposes (i need a read only component with no background)
  21. maybe this helps http://forums.unigui.com/index.php?/topic/6712-overflowing-text-grid-cell-tooltip
  22. I need to align my TUniToolBar to the left of the form. Align=alLeft does that, but the buttons stay horizontal, they are not organized in a column. How do you do that? Bonus: is it possible to do something like that with a TUniMainMenu?
  23. Hello Delphi Developer, I tried that with another form, but it didn't fire on browser resize, so i thought that it was intended for mobile devices (for instance when you rotate your phone from landscape to portrait). Now I see that it does work in the mainform. Why is that? Can you explain to me this behaviour? By the way thanks a lot for the tip, you have been very helpful (as always)
×
×
  • Create New...