Jump to content

mierlp

uniGUI Subscriber
  • Posts

    572
  • Joined

  • Last visited

  • Days Won

    35

Posts posted by mierlp

  1. Hi

     

    I have a uniDBgrid, uniDBedit, datasource and a dbnavigator on the form.

    DB components are all linked to same datasource

     

    my query component (mydac) contains a OnBeforeInsert wich sets

    focus to the uniDBedit field

     

    Situation/behavior 1:

    1. Add new record with dbnavigator, focus is set to unDBEDit and cursor (|) visible-.thats OK

    2. After post with dbnavigator the focus is always set to uniDBGrid - i want focus on uniDBedit

    3. Add new record with dbnavigator, the focus is on the uniDBedit but

      you DON'T see the cursor. The cursus (|) appears after you type a character

     

    Situation/behavior 2:

    1. Repeat  step 1 and 2

    2. scroll unidbgrid 1 record

    3. add new record with dbnavigaor, the focus is on the uniDBedit AND the cursor is visible

     

    Question?

    1. how to set focus after saving record to the uniDBedit instead of unidbgrid ?

    2. why is the behavior of the cursur and how make cursor Always visible ?

     

     

    I use Dephi Tokyo 10.2.2 / uniGui 1.10.0.1467

     

     

     

     

  2. Hi

     

    My application contains about 120 forms and 14 datamodules.

    A datamodules is grouped based on functionality. There's a datamodules dmTypes which contains querys regarding a 'type'

    lets say : typeEntrance, typeParking, typeMeal, typeCatering, typeArtist, typeBooking,  etc.
     

    Sometimes i need a other tables for a lookup functionality and so on this datamodule a put query from a
    other table...lets say statusArtist, The datamodules are only containing querys which i need for that specific

    functionality/forms

     

    The datasource i put on the forms and is add the datamodules which i need in the uses class.

    Forms are only containing datasources which are needed for that specific functionality/forms

     

     

    WHATS THE BEST PLACE TO PUT THE DATASOURCES...ON A DATAMODULE OF FORM
    AND WHAT'S THE REASON BEHIND IT..

     

  3. Hi Wilton

     

    Thats indeed a cleaner peace of code thanks. That works...

    Within my application i use datamodules and all querys are on the datamodule

    I have about 120 forms and 14 datamodules. Datasources are on the

    forms where i need them.

     

    Whats not working is that i need to check if the form is active or opened or showed.

    Otherwise when i open form1 directly and automaticly form2 will be showed

    Even if datasource.autoedit = false

     

    I need a way to check if a form is opened/showed?

     

  4. Hi

     

    I have 2 forms, see attachment

    - form1 contains the datasource (call them DS1 and DS2)  for form1 AND form2,

    - form1 contains information which is store in ds2, see 

    - there\s a master/detail betweens ds1 and ds2 

    - form2 contains no datasources, is linked to form1 

     

    Each datasource contains a .StateChange event with the following code:

    What it does is checking the state of the table, Based on the state (edit or browse)

    some of the buttons are enabled/disabled. Just like a dbnavigator works.

    if dmProduction.ProductionQuickDay.State in [dsBrowse] then begin
       FormTableProductionQuickDay.UniBitBtn_Add.Enabled    := True;
       FormTableProductionQuickDay.UniBitBtn_Delete.Enabled := True;
       FormTableProductionQuickDay.UniBitBtn_Save.Enabled   := False;
       FormTableProductionQuickDay.UniBitBtn_Cancel.Enabled := False;
    end;
    
    if dmProduction.ProductionQuickDay.State in [dsInsert,dsEdit] then begin
       FormTableProductionQuickDay.UniBitBtn_Add.Enabled    := False;
       FormTableProductionQuickDay.UniBitBtn_Delete.Enabled := False;
       FormTableProductionQuickDay.UniBitBtn_Save.Enabled   := True;
       FormTableProductionQuickDay.UniBitBtn_Cancel.Enabled := True;
    end;
    
    

    When i click on the button 'Beheren productie dagen' (below the dbgrid on the right side) the form2 will be showed

    So for so good.

     

    When i change a value,- lets say select a other value in the dblookupcombox. At that moment DS2 is in StateChange

    and some buttons must be enabled/disabled.

     

    Because all datasource are on form1 this is not working. Normally in vcl mode you could use some code like

    if (assigned(Form1) then begin
      if dmProduction.ProductionQuickDay.State in [dsBrowse] then begin
         FormTableProductionQuickDay.UniBitBtn_Add.Enabled    := True;
         FormTableProductionQuickDay.UniBitBtn_Delete.Enabled := True;
         FormTableProductionQuickDay.UniBitBtn_Save.Enabled   := False;
        FormTableProductionQuickDay.UniBitBtn_Cancel.Enabled := False;
      end;
    
      if dmProduction.ProductionQuickDay.State in [dsInsert,dsEdit] then begin
         FormTableProductionQuickDay.UniBitBtn_Add.Enabled    := False;
         FormTableProductionQuickDay.UniBitBtn_Delete.Enabled := False;
         FormTableProductionQuickDay.UniBitBtn_Save.Enabled   := True;
         FormTableProductionQuickDay.UniBitBtn_Cancel.Enabled := True;
      end;
    
    end;
     
    How can i do this, is there a other way to check if a form is assigned or
    a other solutions to enable/disable button when the datasource.StateChange is triggerd

     

    post-510-0-73208900-1532701209_thumb.png

    post-510-0-91289900-1532702178_thumb.png

  5. Hi

     

    My uniTreeMenu contains a lot of submenus.

    Now you must click the triangle to dropdown the submenu...you Always have to

    navigate to the right.

     

    How can i dropdown this submenu when i click somewhere on the menu item

    and not specific on the triangle.

     

    When it click the routine has to check if the submenu is dropped, if so then close

    the submenu, if not...then open the submenu

     

    Regards Peter

    post-510-0-99336600-1532033844_thumb.png

  6. Hi

     

    When you put a unidbedit or uniedit on the form and use the FieldLabel option

    AND you put a uniSpeedbutton next to it you can't get them aligned or you have

    to put the button lower on the form.

     

    See example and you see the result. Nice the fieldlabels but you can't put

    a component next to it.

     

    Raize component has a ButtonEdit and DBbuttonEdit component which

    contains a button in the component. There is also a trigger OnButtonClick

     

    Would be a nice if we can have this functionality/components in uniGui 

     

    Anyone suggestions how to solve the issue. Otherwise i have to use 

    uniLabels above the fields like you can see in the example.

    post-510-0-50533000-1531954369_thumb.png

  7. Hi Delphi Developer

     

    Same result when using the example [DBLookupCombox - GridMode]

     

    This behavior is only when you set :

    WebOptions.Paged := False

    and use the navigation in code it WON'T work propertly with the dbnavigator it works

     

     

    When you set

     

    WebOptions.Paged := True

    and use the navigation in code it WILL work propertly

     

    The problem is...we would use a clean grid with no pages

  8. Hi

     

    I have a uniDBGrid and a uniDBedit on the form

    Both are connected to the same datasource.

     

    On the uniDBGrid is use the uniDBGridKeydown event with this code :

     

    if key=vk_home then begin

       dmBank.Bank.First;

    end;

     

    if key=vk_end then begin

       dmBank.Bank.First

    end;

     

    When i hit the END button...the uniDBedit contains the content of the LAST record

    BUT the uniDBGrid will NOT navigate to the last record. The same is when hitting

    the HOME button.

     

    BUT

     

    when i put a dbnavigator on the form and connect it to the same datasource and use

    the first/end buttons then it's working and the unidbgrid will move the the correct record.

     

    I use :

    - Delphi Tokyo 10.2 update 2

    - uniGui 1.10.0.1467

    - MySQL Data Acces Component (myDAC from devArt) 9.2.6

     

     

     

     

  9. myConnection configuration is ok...and working....see attachment.

    Also when i set the status on active for the query component the

    data is visible.

     

    The version of myDac i use is from april and latest one.

    Normal VLC applications don't have this problem

     

     

    Created a new test application wiith a:

    - myConnection component

    - myQuery

    - myDatasource

     

    Also when i activate them i see the data and the database on

    localhost can be found.

     

    When running the application i get a socket error 10022

    post-510-0-20009900-1527619806_thumb.png

    post-510-0-86396600-1527619826_thumb.png

    post-510-0-88220100-1527620851_thumb.png

  10. hi

     

    I upgraded to the lateste version of uniGui and when running my application it got error message regarding 'unknown localhost' and the

    second one is the memory leak.

     

    This was working till now...I use myDac from DevArt for connecting to a LOCAL mySQL database.

    The DevArt myConnection component is on the 'ServerModule' and this component contains the connection properties like Localhost.

     

    Do i have to put the myConnection property on a 'main' datamodule ?

     

    Regards Peter

    post-510-0-84239500-1527616715_thumb.png

    post-510-0-23236700-1527616723_thumb.png

×
×
  • Create New...