Jump to content

skafy

uniGUI Subscriber
  • Posts

    190
  • Joined

  • Last visited

  • Days Won

    1

skafy last won the day on June 20 2017

skafy had the most liked content!

Recent Profile Visitors

988 profile views

skafy's Achievements

Active Member

Active Member (3/4)

7

Reputation

  1. I've tried and still cannot be changed in FormCreate event. (But I've managed to change color based on irigsoft's help)
  2. I've managed to change colors now in FormReady event. Thank you for your help. So I've created buttons in FormCreate event end than find them on FormReady event end change their color. procedure TDetail.ChangeButtonColors(APanel: TUniPanel); var Name: string; Color: string; begin UniMainModule.qryGETButtons.Close; try UniMainModule.qryGETButtons.Prepare; UniMainModule.qryGETButtons.Open; UniMainModule.qryGETButtons.First; while not UniMainModule.qryGETButtons.Eof do begin Name:= UniMainModule.qryGETButtons.FieldByName('NAME').AsString; Color:= UniMainModule.qryGETButtons.FieldByName('COLOR').AsString; var Button: TUniButton; Button:= (APanel.FindComponent(Name) as TUniButton); if Assigned(Button) then uniSession.AddJS ('document.getElementById("' + Button.JSId + '").style.background = "' + Color + '";'); UniMainModule.qryGETButtons.Next; end; finally UniMainModule.qryGETButtons.Close; end; end; Thanks again
  3. I've tried but it gives me error-> Cannot assign to a read-only property I've also stated that when i debug button.JSid is not null and different between loop cycles.
  4. I'm getting below error. If I debug JSid has value. Code: procedure TDetail.ShowButtons(APanel : TUniPanel); var Name: string; Color: string; Align: string; begin UniMainModule.qryGETButtons.Close; try UniMainModule.qryGETButtons.ParamByName('TASKINS_ID').AsInteger:= Taskins_ID; UniMainModule.qryGETButtons.Prepare; UniMainModule.qryGETButtons.Open; while not UniMainModule.qryGETButtons.Eof do begin Name:= UniMainModule.qryGETButtons.FieldByName('NAME').AsString; Color:= UniMainModule.qryGETButtons.FieldByName('COLOR').AsString; Align:= UniMainModule.qryGETButtons.FieldByName('ALIGN').AsString; var Button: TUniButton; Button:= TUniButton.Create(Self); Button.Parent:= APanel; Button.AlignWithMargins:= True; Button.Caption:= Name; uniSession.AddJS ('document.getElementById("' + Button.JSId + '").style.background = "red";'); if Align = 'Left' then button.Align:= alLeft else if Align = 'Center' then button.Align:= alClient else if Align = 'Right' then button.Align:= alRight; UniMainModule.qryGETButtons.Next; end; finally UniMainModule.qryGETButtons.Close; end; end;
  5. If custom CSS must be defined in Server module it must be done in design time. How can I change color of a button in runtime to any color?
  6. Have you solved your last problem ?

    1. Show previous comments  5 more
    2. Alain Debande

      Alain Debande

      France🙂

    3. skafy

      skafy

      So we live close :)

       

      I've managed to overcome problem and create event on dataset field (onChange). So when data change on dataset i get event fired. I can then read value as query.fieldbyname('lala').asstring....

       

      lala.png.40499682e0cb76b675da7583358345f9.png

    4. Alain Debande

      Alain Debande

      Yes Slovenia is not so far, if you want, we could stay in touch concerning delphi and uniGUI.

      alaindebande333@gmail.com

      Thanks very much for the solution of the problem

      image.png.e101e79dc3064737b8ed2fadf898c82e.png

  7. Hi, I'm having problem how to read value after I Select a value on my Combobox Editor in Grid column. procedure TMainForm.UniDropDownSelect(Sender: TObject); begin ShowMessage('UniDropDownSelect' + TUniComboBox(Sender).Items.Strings[ TUniComboBox(Sender).ItemIndex]); end; procedure TMainForm.FDQuery1AfterOpen(DataSet: TDataSet); var lala: TUniComboBox; begin lala:= TUniComboBox.Create(Self); lala.Items.Add('lala1'); lala.Items.Add('lala2'); lala.OnSelect:= UniDropDownSelect; UniDBGrid1.Columns.ColumnFromFieldName('COL1').Editor:= lala; end; The UniDropDownSelect allways returning Item Index of -1. How can I retrive value after it vas selected.?
  8. Ok I've managed to install UniGui. I had to manually add following lines to Library Path
  9. I have the same problem. Trying to install Unigui build 1546 on 10.4 Delphi and get the same error. I don't do Clean all. Unistall unigui install delphi 10.4 (from 10.3.3) install unigui 1546 (also tried 1543) - full install... i get error [dcc32 Fatal Error] uniTools27.dpk(52): F1026 File not found: 'InstDecode.pas' Where is the problem?
  10. Thank you. This solves my problem. Thanks!
  11. Hi, I would like to add text to pagingBar that will show total number of records that in DBGrid (dataset). How can this be achived.
  12. I'm pretty sure. I won't install 1506 again. I have a project and didn't work on port 8077. I than downloaded 1504 and run the same project and it worked. Are you able to run your project on port 8077 on 1506 build?
×
×
  • Create New...