Jump to content

markus_ja

Members
  • Content count

    323
  • Joined

  • Last visited

1 Follower

About markus_ja

  • Rank

Profile Information

  • Gender
    Not Telling
  • Location
    Austria
  1. TMS Web Core

    That‘s true. TMS currently targets desktop browsers.
  2. TMS Web Core

    The have already a full working designer and a lot of controls. As they stated, you can use all FNC components: Grid Ribbon Planner RichEditor TreeView PDF Lib PageControl & panels Edit List Pickers & selectors Miscellaneous
  3. Smart 2.9.9 [alpha] is here!

    How would the code look like, if you want to put a second control under the first control, considering padding and margin)? secondControl.SetTop(firstControl.ClientHeight + ???)
  4. LineBreak

    Yes. It's already included in SmartCL.System. At least in v2.2.1
  5. Help with app

    I encountered troubles with the LayoutManager if it dependce on other elements, too. In my case I had to create a new Layout instance on every resize call. Try to place the FLayout := into the overridden Resize method. It seems that the LayoutManager caches some size properties from child contols for better performance, but didn't think of other use cases.
  6. Savetostring issue in TW3Dataset

    The issue is in the following code in the unit: System.DataSet Function TW3Dataset.SaveToString:String; var mHead: TW3DatasetHeader; Begin if FActive then Begin try (* Setup the header *) mHead.dhMagic:=$CAFE; mHead.dhCount:=getRecCount; (* Serialize and store field-defs *) mHead.dhFieldDefs:=EncodeURI(FDefs.SaveToString); (* Serialize and store dataset records *) asm (@mHead).dhData = JSON.stringify((@self).FCache); end; (* Now serialize and return text representation of data structure *) asm @result = JSON.stringify(@mHead); end; except on e: exception do raise EW3Dataset.CreateFmt(CNT_ERR_DATASET_FailedStore,[e.message]); end; end; end; Replace asm (@mHead).dhData = JSON.stringify((@self).FCache); end; with asm (@mHead).dhData = JSON.stringify(@FCache); end; And it will work! Reason: (@self).FCache becomes in javascript (self).FCache$1.
  7. LocalStorage

    The issue is, that form activate and deactivate are not invoked by the framework. You have to call activate or deactivate by your self.
  8. Listbox Item Fonts

    Hi ielite, if you look at the components source code, it's obviously that your code (style) is not working. You have to define your custom style classes in the TW3ListBox, and not on the Item itself, e.g.: lbxMenu.Styles.Item := 'lbItem'; lbxMenu.Styles.Highlighted := 'lbItem'; lbxMenu.Styles.Selected := 'lbItem'; The TW3ListBox.HandleMouseEnter event overrides the item style using its defined styles. procedure TW3ListBox.ColorItem(item: TW3CustomControl; itemStyle: String; itemColor: TColor; colorVisible: boolean); begin if colorVisible then begin item.StyleClass := itemStyle; //<- style applied!!! item.Color := itemColor; end; end; My advise: If you have troubles with styles, use the build in chrome debugger (F12) and have a look at the html code (elements tab), and watch wich styles are applied and when.
  9. How to change the style of a TW3Header text?

    I didn't try right now, but you can declare as many css class styles you need. in your case, this should work: .pnlHeader > fieldset > .TW3LabelText { color: green; } .pnlHeader > button { color: red; }
  10. How to change the style of a TW3Header text?

    This works fine for me. No changes required. W3HeaderControl1.StyleClass := 'myHeaderText'; .myHeaderText > fieldset > div { color: green; } or .myHeaderText > fieldset > .TW3LabelText { color: green; }
  11. layering mechanism for nested layouts

    This is an unmonitored User Forum. So your Suggestion will not be Seen by the proper People. since there ist so less activity, i Hope that Project is not dead.
  12. Styling a Panel with a background image

    use background: url('nav_bg_leaves.gif') no-repeat 0 100%; instead of background-image. This is an invalid property. Also delete res/ . It seems, that res/ is automatically added.
  13. input type="file" not working on iOS9 (iPad)

    You don't have to use the TW3EditBox. You have to use "clean" <input> tag, without all the default attributs. I created a simple wrapper: TMyInputFile = class(TW3CustomControl) private procedure SetAccept(aValue: string); procedure SetCapture(aValue: string); protected function MakeElementTagObj: THandle; override; procedure StyleTagObject; override; public procedure OpenDialog; property Accept: string write SetAccept; property Capture: string write SetCapture; end; { TMyInputFile } procedure TMyInputFile.StyleTagObject; begin //prevent default w3_setAttrib(Handle, 'type', 'file'); end; function TMyInputFile.MakeElementTagObj: THandle; begin result := w3_createHtmlElement('input'); end; procedure TMyInputFile.SetCapture(aValue: String); begin w3_setAttrib(Handle, 'capture', aValue); end; procedure TMyInputFile.SetAccept(aValue: String); begin w3_setAttrib(Handle, 'accept', aValue); end; procedure TMyInputFile.OpenDialog; begin Handle.click(); end; Usage: //Image File Upload _myFileOpenDialog := TMyInputFile.Create(divViewGeneral); _myFileOpenDialog.Visible := false; _myFileOpenDialog.Accept := 'image/*'; // or '.png, .jpg' _myFileOpenDialog.Capture := 'camera'; _myFileOpenDialog.Handle.addEventListener('change', procedure(e: Variant) var fileReader: JFileReader; fileList: JFileList; begin fileList := JFileList(e.target.files); if fileList.length > 0 then _imageFile := fileList.item(0) else _imageFile := nil; if Assigned(_imageFile) then begin fileReader := JFileReader.Create; fileReader.onload := function(event: JEvent): Variant begin imgRecipe.Url := Variant(event.target).result; result := true; end; fileReader.readAsDataURL(_imageFile); end; end, false);
  14. CSS Tools with SMS

    What to you mean?
  15. EncodeDate Rounding issue

    Thanks! Interessting. But the issue I encountered is actually in the DWS function StrToDate(), which I am using. I just saw that this function is using EncodeDate, and tried to isolate the issue. Is there also a trick
×