Jump to content

Recommended Posts

Posted

I'm having problems with component positioning. What is shown in design time is not being respected at runtime.

 

The involved "containers" are like this:

 

MainForm -> ContainerPanel -> Frame -> Panel -> Visual components

 

UniEdits and UniCombos located in the Panel respects the position defined at design time, but UniGroupBox and UniCheckBox appears at wrong position in runtime.

 

Btw, how do I post a image here? The image button asks for an URL. Isn't there a way to post directly to the forum?

 

Berlin 10.1 and UniGUI 0.99.95.1300

 

[]s

Carlos

Posted

Well, I think that now I understood what is going on.

 

I'm using the Fieldlabel property of the DBEdits and DBCombos to display the label at top. Since the labels are not shown at designtime, I guess in runtime all the edits are moved a few pixels below (to accommodate the label above them). So, other components not using the Fieldlabel property looks like "misaligned".

 

So, is this expected? Is it a good practive to use the Fieldlabel properties?

 

Carlos

  • 6 months later...
Posted

+1

As soon as I started using FieldLabel I noticed this inconsistency between design and runtime. This is pretty evident if set FieldAlign = alTop: nothing changes at design time, while at run time the Edit is moved several pixels down.

Posted

Hi,

 

Temporary workaround:

function afterrender(sender, eOpts)
{
    if (sender.labelEl && sender.labelAlign == "top") {
        var _t=sender.labelEl.el.getY();
        sender.el.setY(_t-sender.labelEl.el.getHeight()-13);
    }  
}

Best regards.

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...