Jump to content

mos

uniGUI Subscriber
  • Posts

    269
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by mos

  1. mos

    StringGrid Questions

    Hi Delphi Developer, I've noticed that if I use this code you provide: UniStringGrid1.JSInterface.JSCode(#1'.rc[2][2]="background-color:green; color:white";'#1'.view.refresh();'); Using the above as an example the cell[2,2] will have a background color of green but if you highlight this row and have row select set to True, the row selection bar is not visible in cell[2,2] but is visible in cells that don't use the above code?
  2. Hi MarBar77, Did you find a solution to this as I am also trying to add some styling to the div .x-grid-cell-inner in a UniStringGrid but this doesn't seem to be working?
  3. Is there a way of auto sizing columns in a UniStringGrid so that the width of the column is based on the widest cell text item in the column?
  4. Would also like some sort of explanation on what ChainMode does as well as RunOnce and DummyEvents? Actually just found some information from this thread regarding ChainMode http://forums.unigui.com/index.php?/topic/6457-difference-between-tunitimer-and-tunithreadtimer/?hl=chainmode&do=findComment&comment=42041
  5. Hi Arilotta, I made the change but noticed that you need to click the checkbox before the item is highlighted. What I would like is for the highlight bar to operate by just clicking on the row item rather than having to click the checkbox. In other words the checkbox and highlight bar operate independently of each other. I played around with the change and I now understand what is happening. If you select an item by clicking the checkbox the item gets highlighted. Is it possible to remove the highlight bar when a checkbox is checked i.e. In other words I don't want the checked items to be highlighted?
  6. Hi Arilotta, Thank you for all your help so far. I've notice that highlight bar which is present in a normal UniGUI listbox is not present. Is it possible to show the highlight bar so the user knows which record is selected when you click on the item text?
  7. Hi Delphi Developer, I just stumbled across this issue and found this post. I tried the following HTML code as an example but the background color of the HTMLFrame does not change procedure TMainForm.UniButton1Click(Sender: TObject); begin FHTMLFrame.HTML.Text := '<html> ' + ' <body style="background-color:powderblue;"> ' + ' <h1>This is a heading</h1> ' + ' <p>This is a paragraph.</p> ' + ' </body> ' + ' </html> '; end;
  8. mos

    StringGrid Questions

    Hi Delphi Developer, I noticed in this thread http://forums.unigui.com/index.php?/topic/9122-tunidbgrid-color-combo/ you had created a color picker for DBGrid is it possible to implement this for a StringGrid rather than my idea above of using a TUniColorPalette?
  9. Hi Delphi Developer, I am actually creating the UniHTMLMemo in code and tried to use that code but the popup menu still appears. FHTMLMemo := TUniHTMLMemo.Create(Self); FHTMLMemo.Parent := Self; FHTMLMemo.Left := 10; FHTMLMemo.Width := 100; FHTMLMemo.Top := 10; FHTMLMemo.Height := 100; FHTMLMemo.ClientEvents.ExtEvents.Values['afterrender'] := 'function afterrender(sender, eOpts){ ' + ' sender.inputEl.el.dom.contentWindow.oncontextmenu = function(){ ' + ' return false};}';
  10. How can I did disable the popup menu that appear when you right mouse on a UniHTMLMemo?
  11. mos

    StringGrid Questions

    Hi Delphi Developer, Build 1413.
  12. mos

    StringGrid Questions

    Hi Delphi Developer, Any help with the above two items would be appreciated.
  13. Hi Andrea, Thanks for the update. However I have noticed something odd. I have a simple project with just the main form, a button and an empty TUniCheckListBox. On the button click I have the following code: procedure TMainForm.UniButton1Click(Sender: TObject); begin UniCheckListBox1.Items.Add('Item 1'); UniCheckListBox1.Items.Add('Item 2'); UniCheckListBox1.Items.Add('Item 3'); UniCheckListBox1.Selected[1] := True; end; When I run the program and click the button I see the items in the listbox but the Selected[1] does not check the checkbox of the item.
  14. Hi Andrea, I noticed one issue. If you use the object inspector to set the Items in design time I get AV in the RTL160.bpl. Do you have any issues setting the items in design time?
  15. Hi Delphi Developer, This doesn't seem to work if the Panel.Visible = False and you try Fade In the panel as the panel just suddenly appears. Ideally what I want is when Panel 1 fades out I want Panel 2 which is hidden to simultaneously fade in.
  16. I have two panels ie. Panel 1 and Panel 2 and need to perform a fading transition effect between the two panels. e.g. Panel 1 is visible and then it fades out while Panel 2 is fading in. How could I achieve the above transition effect?
  17. I am trying to prevent text selection highlighting of a TUniLabel which is being dynamically created in code. In the UniServerModule.CustomCSS I have the following: .noselect { -webkit-touch-callout: none; /* iOS Safari */ -webkit-user-select: none; /* Safari */ -khtml-user-select: none; /* Konqueror HTML */ -moz-user-select: none; /* Firefox */ -ms-user-select: none; /* Internet Explorer/Edge */ user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */ } And In code I create the label and try to set the UniEvents beforeInit: FLbl := TUniLabel.Create(Self); FLbl.Parent := Self; FLbl.Font.Size := 20; FLbl.Left := 10; FLbl.Text := 'Hello There'; FLbl.ClientEvents.UniEvents.Text := 'beforeInit=function beforeInit(sender, config)'#13#10'{'#13#10' config.cls=' + '"noselect";'#13#10'}' However the above does not work and I can still highlight the label text. I know the CSS does work if I put a TUniLabel on a form and in the object inspector set the beforeInit. What do I need to do to get the above code to work when the label is dynamically created?
  18. Hi Andrea, Since Selected is a boolean should that actually be BoolToStr?
  19. I am trying to build and install this component for XE2 but am getting errors in the following line of code: JSInterface.JSCode(#1'.el.select("input[type=checkbox]:nth('+(i+1).ToString+')").elements[0].checked='+Selected[i].ToString.ToLower+';'); Compiler seems to be complaining about .ToString and .ToLower and the error is: "E2018 Record, object or class type required" Does anyone know what changes I would need to make to the above so it builds?
  20. mos

    ScrollBox Border

    Hi Delphi Developer, If you add an empty scrollbox to a form and then run your UniGui application you can't actually see any sort of outline of the scrollbox ie. it's just an empty space. What I would like is some sort of border around the scrollbox so the user knows there something there e.g. similiar to an empty listbox which has a border around it.
  21. mos

    ScrollBox Border

    At the moment I am putting a scrollbox inside a TSimplePanel and turning the Border property on. Is it possible to enable a border similar to the border on a TSimplePanel so I don't have to use a TSimplePanel?
  22. mos

    StringGrid Questions

    Hi Delphi Developer, Is it possible to set up a column of cells (e.g. column 1) in a string grid so that when you click in a cell a TUniColorPalette is displayed underneath the cell, and once the user selects a color the cell background is set to this color? I would also need to know what color was selected so I can store it in the cells object. The other question I have is how can I display a drop down combobox with some options in a cell and get the option that is selected so I can store it in a cell object?
  23. Hi Delphi Developer, I have another situation which I hope you can help me with. I have a project which has e.g. three TUniPanels (for this example I will call them Panel1, Panel2, Panel3) which I have added your code above to so this will toggle the red border on and off when clicked, so the user knows which Panel(s) have been selected. I need some way of clearing the border of a previously selected Panel if another has been selected e.g. if Panel1 has a red border and I click Panel3 then the border around Panel1 should be cleared.
  24. I need to create a combobox box which contains a list of font names which the user can select from. Does anyone have any idea in terms of how I can populate the combobox with font names?
×
×
  • Create New...