Jump to content


Photo

UniScrollBox Transparent


  • Please log in to reply
17 replies to this topic

#1 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 300 posts
  • LocationCuiabá-Brasil

Posted 06 September 2017 - 02:59 PM

Would it be possible to get a transparent scrollbox?

I tried the code below, but it causes a form problem

 

uniscrollbox:

 

function OnAfterrender(sender)
{
  sender.setBodyStyle("background","transparent"); 
}


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3480 posts

Posted 07 September 2017 - 05:35 PM

Hi,

 

Please, can you make a simple testcase or screenshots "for this" ?!

 

Best regards,


  • 0

#3 Hayri Aslan

Hayri Aslan

    Advanced Member

  • Moderators
  • 430 posts
  • Locationİstanbul - Turkey

Posted 07 September 2017 - 07:05 PM

Add This To OnReady

with UniScrollBox1.JSInterface do
    JSCall('getDragEl().applyStyles', [JSObject(['background-color', 'transparent', 'frame', 'false', 'border', 'none'])]);

  • 0

#4 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 300 posts
  • LocationCuiabá-Brasil

Posted 12 September 2017 - 10:27 PM

Hayri Aslan

Perfect

 

It would be possible to achieve a similar effect however for the form. That is, have the form transparent?

I found some posts by the forum, yet all with the same questions and still open with no apparent answers.

 

I would like to keep the edges of the form, but its panel would be transparent


  • 0

#5 Hayri Aslan

Hayri Aslan

    Advanced Member

  • Moderators
  • 430 posts
  • Locationİstanbul - Turkey

Posted 13 September 2017 - 10:18 AM

Can you try this

with UniForm1.WebForm.JSInterface do
  begin
    JSCall('getEl().applyStyles', [JSObject(['background-color', 'transparent', 'frame', 'false', 'border', 'none'])]);
    JSCall('body.applyStyles', [JSObject(['background-color', 'transparent', 'frame', 'false', 'border', 'none'])]);
    JSCall('uform.body.applyStyles', [JSObject(['background-color', 'transparent', 'frame', 'false', 'border', 'none'])]);
    JSCall('header.el.applyStyles', [JSObject(['background-color', 'transparent', 'frame', 'false', 'border', 'none'])]);
  end;

  • 0

#6 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 300 posts
  • LocationCuiabá-Brasil

Posted 13 September 2017 - 12:49 PM

 

Can you try this

with UniForm1.WebForm.JSInterface do
  begin
    JSCall('getEl().applyStyles', [JSObject(['background-color', 'transparent', 'frame', 'false', 'border', 'none'])]);
    JSCall('body.applyStyles', [JSObject(['background-color', 'transparent', 'frame', 'false', 'border', 'none'])]);
    JSCall('uform.body.applyStyles', [JSObject(['background-color', 'transparent', 'frame', 'false', 'border', 'none'])]);
    JSCall('header.el.applyStyles', [JSObject(['background-color', 'transparent', 'frame', 'false', 'border', 'none'])]);
  end;

Tanks Hayri Aslan

 

I tried the same form ready event as well as others, however I'm getting a read failure error on property.

Attached Files


  • 0

#7 Hayri Aslan

Hayri Aslan

    Advanced Member

  • Moderators
  • 430 posts
  • Locationİstanbul - Turkey

Posted 13 September 2017 - 05:08 PM

This Is MainForm.

 

Are you trying to set transparent the MainForm?


  • 0

#8 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 300 posts
  • LocationCuiabá-Brasil

Posted 13 September 2017 - 05:20 PM

No, form1


  • 0

#9 Hayri Aslan

Hayri Aslan

    Advanced Member

  • Moderators
  • 430 posts
  • Locationİstanbul - Turkey

Posted 13 September 2017 - 06:24 PM

My Code is working.

 

You writed viewport.beforerender in uniform1.

 

Just delete this clientevent


  • 0

#10 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 300 posts
  • LocationCuiabá-Brasil

Posted 14 September 2017 - 03:03 AM

My Code is working.

 

You writed viewport.beforerender in uniform1.

 

Just delete this clientevent

Did not quite understand. What code should I put in the viewport.beforerender


  • 0

#11 Hayri Aslan

Hayri Aslan

    Advanced Member

  • Moderators
  • 430 posts
  • Locationİstanbul - Turkey

Posted 14 September 2017 - 06:12 AM

In your example you have that. Delete it.

 

ebsCb9W9TuqzZUN7j5EmrA.png


  • 0

#12 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 300 posts
  • LocationCuiabá-Brasil

Posted 14 September 2017 - 12:03 PM

 O42=new Ext.window.Window({id:"O42_id",retfalse:{},onEsc:Ext.emptyFn,layout:"fit",title:"UniForm2",maximizable:true,minimizable:true,resizable:true,icon:"/cache/project1_exe/sjmBOsGMhM100411986/favicon.ico",uniFMask:{beforeclose:true},width:539,height:274,x:530,y:248});O42.nm="O42";_cdo_("UniForm2");UniForm2.ajxS=AjaxSuccess;UniForm2.ajxF=AjaxFailure;O42.rootObj=true;UniForm2.appRoot="/";_cdo_(null,O42,"window",UniForm2);_coe_(UniForm2,null,"viewport","beforerender",function(sender, eOpts) {    sender.setBodyStyle("background","transparent"); }); O4A=new Ext.form.Panel({id:"O4A_id",border:false,tabItems:new Ext.util.MixedCollection(),layout:"absolute"});O4A.nm="O4A";_cdo_(null,O4A,"form",UniForm2);O42.add(O4A); O52= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O42&Evt=beforeclose&this="+P0.nm+""+_gv_(O4A),success:AjaxSuccess,failure:AjaxFailure,obj:O42,e:"beforeclose"});});O52.nm="O52";O42.on("beforeclose",O52); O53= (function(P0){_saf_(P0);return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O42&Evt=activate&this="+P0.nm+""+_gv_(O4A),success:AjaxSuccess,failure:AjaxFailure,obj:O42,e:"activate"});});O53.nm="O53";O42.on("activate",O53); O54= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O42&Evt=deactivate&this="+P0.nm+""+_gv_(O4A),success:AjaxSuccess,failure:AjaxFailure,obj:O42,e:"deactivate"});});O54.nm="O54";O42.on("deactivate",O54);O42.on("deactivate",function(f){_sdf_(f)}); O55= (function(P0,P1,P2){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O42&Evt=resize&this="+P0.nm+"&w="+P1+"&h="+P2+""+_gv_(O4A),success:AjaxSuccess,failure:AjaxFailure,obj:O42,e:"resize"});});O55.nm="O55";O42.on("resize",O55); O56= (function(P0,P1,P2){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O42&Evt=move&this="+P0.nm+"&x="+P1+"&y="+P2+""+_gv_(O4A),success:AjaxSuccess,failure:AjaxFailure,obj:O42,e:"move"});});O56.nm="O56";O42.on("move",O56); O57= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O42&Evt=maximize&this="+P0.nm+""+_gv_(O4A),success:AjaxSuccess,failure:AjaxFailure,obj:O42,e:"maximize"});});O57.nm="O57";O42.on("maximize",O57); O58= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O42&Evt=minimize&this="+P0.nm+""+_gv_(O4A),success:AjaxSuccess,failure:AjaxFailure,obj:O42,e:"minimize"});});O58.nm="O58";O42.on("minimize",O58); O59= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O42&Evt=restore&this="+P0.nm+""+_gv_(O4A),success:AjaxSuccess,failure:AjaxFailure,obj:O42,e:"restore"});});O59.nm="O59";O42.on("restore",O59);O42.show("");O42.retfalse.beforeclose=1;_axy_(O42);O42.uniMask={ldMask:false,maskWaitData:false,maskUseMsg:true};O42.uniMask.targetObj=null;


  • 0

#13 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 300 posts
  • LocationCuiabá-Brasil

Posted 14 September 2017 - 12:04 PM

I did exactly like this in your code, but the error occurs.

Attached Files


  • 0

#14 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 300 posts
  • LocationCuiabá-Brasil

Posted 14 September 2017 - 12:06 PM

Here's how it is.

Attached Files


  • 0

#15 GerhardV

GerhardV

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 134 posts
  • LocationSouth Africa

Posted 14 September 2017 - 12:47 PM

"In your example you have that. Delete it."

 

I think he meant you have to delete it instead :)


  • 0

uniGUI - LOVE IT!


#16 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 300 posts
  • LocationCuiabá-Brasil

Posted 14 September 2017 - 01:02 PM

Hi, ok

 

Perfect


  • 0

#17 Hayri Aslan

Hayri Aslan

    Advanced Member

  • Moderators
  • 430 posts
  • Locationİstanbul - Turkey

Posted 14 September 2017 - 07:18 PM

Is it fine?


  • 0

#18 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 300 posts
  • LocationCuiabá-Brasil

Posted 14 September 2017 - 09:13 PM

fine

Perfect

Tanks Hayri


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users