Jump to content

How to create a "databaseList" with uniPanels and Standard-DBGrid-Funktions


erich.wanker

Recommended Posts

[Webmode]  Hello,

 

i am trying to create a selfmade "databaseList"

what i have since now works "normal" and fast  .. but how should i handle "marked entries" ?

 

 

i want to "select" a panel with single click .. (change the image which is in the panel)

i want to "open" a record with doubleclick  (i lose the doubleclick funktion with tests of "select" .. the first click will be stolen for the "select" funktion)

not important but nice: i want to navigate with keyboard 

 

AND  ... my javascript and css knowHow is very bad :-(

 

 

Thanx for helping

Erich

 

************************************************************************************

 

 

i create uniPanels at runtime   .. the TAG value of my_uniPanel is the unique recordNr. of the current record

while not unimainmodule.ZTabelname.Eof do
begin
my_uniPanel:=tuniPanel.Create(my_structure);

i define Single AND DoubleClick on the panel

my_uniPanel.OnDblClick:=my_panel_dbclick   .... same for single click

i define "hover effects" for the "rows"

   my_uniPanel.ClientEvents.ExtEvents.Add
      ('OnAfterrender=function OnAfterrender(sender)'+
      ' {  sender.setBodyStyle("background-color:#FFFFFF"); }');
   my_uniPanel.ClientEvents.ExtEvents.Add
      ('OnMouseout=function Onmouseout(sender)'+
      ' { sender.body.applyStyles("background-color:#FFFFFF"); }');
   my_uniPanel.ClientEvents.ExtEvents.Add
      ('Onmouseover=function Onmouseover(sender)'+
      ' {sender.body.applyStyles("background-color:#E8E8E8"); }');

 

 

i create a image in every unipanel..

my_uniimage:=TuniImage.Create(my_uniPanel);

i create a uniLabel for the text   ... my_uniLabel.caption is filled with database values ...

my_uniLabel:=TuniLabel.Create(my_uniPanel);
my_uniLabel.Parent:=my_uniPanel;

i give the uniLables a css class..

my_script:='OnAfterCreate=function OnAfterCreate(sender) '+
    '{  '+
    ' sender.cls="x-dbtext100-user";'+
    '}  ';
my_uniLabel.ClientEvents.UniEvents.Add(my_script);

 

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...