Revision history [back]

click to hide/show revision 1
initial version

asked 2023-01-02 18:58:29 +0800

AnkitIan gravatar image AnkitIan

Set column height fixed

Hi below is my code :

<zk> <window id="workload" height="100%" width="100%" apply="org.zkoss.bind.BindComposer" viewmodel="@id('vm') @init('com.multimasteruniters.brains.workload.web.controllers.zk.WorkloadManagement')"> <style> .myGrid { height: 30px !important; text-align:center; } </style> <hbox> <hbox align="start"> <radiogroup id="comboType" oncheck="@command('showOptions',filterValue=self.selectedItem.value,listModelQueue=workloadQueueCombo.model,listModelUserGroup=workloadUserGroupCombo.model,listModelUser=workloadUserCombo.model)"> <radio label="Queue" radiogroup="comboType" value="0" selected="true"/> <radio label="User Group" value="1" radiogroup="comboType"/> <radio label="User" value="2" radiogroup="comboType"/> </radiogroup> </hbox> <hbox align="center"> <combobox id="workloadQueueCombo" model="@load(vm.workloadQueues)" selecteditem="@bind(vm.selectedQueue)" onselect="@command('showQueueItems')" placeholder="${ b:l('str.workload.queue') }" width="500px" autodrop="true" visible="@load(vm.filterValue eq 0)"> <template name="model" var="queue"> <comboitem label="@load(queue.name)"/> </template> </combobox> <combobox id="workloadUserGroupCombo" model="@load(vm.workloadUserGroups)" selecteditem="@bind(vm.selectedWorkloadUserGroup)" onselect="@command('showQueueItems')" placeholder="${ b:l('str.workload.user_group') }" width="500px" autodrop="true" visible="@load(vm.filterValue eq 1)"> <template name="model" var="userGroup"> <comboitem label="@load(userGroup.description)"/> </template> </combobox> <combobox id="workloadUserCombo" model="@load(vm.workloadUsers)" selecteditem="@bind(vm.selectedWorkloadUser)" onselect="@command('showQueueItems')" placeholder="${ b:l('str.workload.user') }" width="500px" autodrop="true" visible="@load(vm.filterValue eq 2)"> <template name="model" var="user"> <comboitem label="@load(user.name)"/> </template> </combobox> </hbox> <hbox align="end">

<template name="children"> <checkbox width="75px" label="@load(each)" checked="true" oncheck="@command('setStatus',checked=self.checked,status=each)"/> </template>
</hbox> </hbox> <separator spacing="10px"/> <hbox> <grid model="@load(vm.workloadQueueItems)" mold="paging" pagesize="15"> <columns sclass="myGrid"> <column label="Queue" align="center" visible="@load(vm.filterValue eq 1 || vm.filterValue eq 2)"/> <column label="${ b:l('str.workload.user_groupname') }" visible="@load(vm.filterValue eq 0 || vm.filterValue eq 2)"/> <column label="${ b:l('str.workload.username') }" align="center" visible="@load(vm.filterValue eq 0 || vm.filterValue eq 1)"/> <column label="${ b:l('str.workload.description') }" align="center"/> <column label="${ b:l('str.workload.status') }" align="center"/> <column label="${ b:l('str.workload.starttime') }" align="center"/> <column label="${ b:l('str.workload.totalduration') }" align="center"/> </columns> <template name="model" var="queueItem" &gt;="" <row=""> <label value="@load(queueItem.queueName)" visible="@load(vm.filterValue eq 1 || vm.filterValue eq 2)"/> <label value="@load(queueItem.userGroupDescription)" visible="@load(vm.filterValue eq 0 || vm.filterValue eq 2)"/> <label value="@load(queueItem.username)" visible="@load(vm.filterValue eq 0 || vm.filterValue eq 1)"/> <label value="@load(queueItem.description)"/> <label value="@load(queueItem.userQueueStatus)"/> <label value="@load(queueItem.startTime)"/> <label value="@load(queueItem.totalDuration)"/> </row> </template> </grid> </hbox> </window> </zk>

I have 3 radio buttons; on clicking each one of them we get a grid with column headers of different size I want a fixed column height tried using css and other properties but didn't worked out for me. Can anyone help me out please Thanks in advance.

Set column height fixed

Hi below is my code :

<zk>
        <window id="workload" height="100%" width="100%" apply="org.zkoss.bind.BindComposer" viewmodel="@id('vm') viewModel="@id('vm') @init('com.multimasteruniters.brains.workload.web.controllers.zk.WorkloadManagement')">
           <style>
             .myGrid {
               height: 30px !important; 
               text-align:center;
             }
         </style>
            <hbox>
                <hbox align="start">
                    <radiogroup id="comboType" oncheck="@command('showOptions',filterValue=self.selectedItem.value,listModelQueue=workloadQueueCombo.model,listModelUserGroup=workloadUserGroupCombo.model,listModelUser=workloadUserCombo.model)">
onCheck="@command('showOptions',filterValue=self.selectedItem.value,listModelQueue=workloadQueueCombo.model,listModelUserGroup=workloadUserGroupCombo.model,listModelUser=workloadUserCombo.model)">
                        <radio label="Queue" radiogroup="comboType" value="0" selected="true"/>
                        <radio label="User Group" value="1" radiogroup="comboType"/>
                        <radio label="User" value="2" radiogroup="comboType"/>
                    </radiogroup>
                </hbox>
                <hbox align="center">
                    <combobox id="workloadQueueCombo" model="@load(vm.workloadQueues)" selecteditem="@bind(vm.selectedQueue)" onselect="@command('showQueueItems')" selectedItem="@bind(vm.selectedQueue)" onSelect="@command('showQueueItems')" placeholder="${ b:l('str.workload.queue') }" width="500px" autodrop="true" visible="@load(vm.filterValue eq 0)">
                       <template name="model" var="queue">
                           <comboitem label="@load(queue.name)"/>
label="@load(queue.name)" />
                        </template>
                    </combobox>
                    <combobox id="workloadUserGroupCombo" model="@load(vm.workloadUserGroups)" selecteditem="@bind(vm.selectedWorkloadUserGroup)" onselect="@command('showQueueItems')" selectedItem="@bind(vm.selectedWorkloadUserGroup)" onSelect="@command('showQueueItems')" placeholder="${ b:l('str.workload.user_group') }" width="500px" autodrop="true" visible="@load(vm.filterValue eq 1)">
                       <template name="model" var="userGroup">
                           <comboitem label="@load(userGroup.description)"/>
label="@load(userGroup.description)" />
                        </template>
                    </combobox>
                    <combobox id="workloadUserCombo" model="@load(vm.workloadUsers)" selecteditem="@bind(vm.selectedWorkloadUser)" onselect="@command('showQueueItems')" selectedItem="@bind(vm.selectedWorkloadUser)" onSelect="@command('showQueueItems')" placeholder="${ b:l('str.workload.user') }" width="500px" autodrop="true" visible="@load(vm.filterValue eq 2)">
                       <template name="model" var="user">
                           <comboitem label="@load(user.name)"/>
label="@load(user.name)" />
                        </template>
                    </combobox>
                </hbox>
                <hbox align="end">
                    

<div children="@load(vm.userQueuesStatus)"> <template name="children"> <checkbox width="75px" label="@load(each)" checked="true" oncheck="@command('setStatus',checked=self.checked,status=each)"/> onCheck="@command('setStatus',checked=self.checked,status=each)"/> </template>
</div> </hbox> </hbox> <separator spacing="10px"/> spacing="10px" /> <hbox> <grid model="@load(vm.workloadQueueItems)" mold="paging" pagesize="15"> pageSize="15"> <columns sclass="myGrid"> <column label="Queue" align="center" visible="@load(vm.filterValue eq 1 || vm.filterValue eq 2)"/> <column label="${ b:l('str.workload.user_groupname') }" visible="@load(vm.filterValue eq 0 || vm.filterValue eq 2)"/> <column label="${ b:l('str.workload.username') }" align="center" visible="@load(vm.filterValue eq 0 || vm.filterValue eq 1)"/> <column label="${ b:l('str.workload.description') }" align="center"/> <column label="${ b:l('str.workload.status') }" align="center"/> <column label="${ b:l('str.workload.starttime') }" align="center"/> <column label="${ b:l('str.workload.totalduration') }" align="center"/> </columns> <template name="model" var="queueItem" &gt;="" <row=""> > <row> <label value="@load(queueItem.queueName)" visible="@load(vm.filterValue eq 1 || vm.filterValue eq 2)"/> <label value="@load(queueItem.userGroupDescription)" visible="@load(vm.filterValue eq 0 || vm.filterValue eq 2)"/> <label value="@load(queueItem.username)" visible="@load(vm.filterValue eq 0 || vm.filterValue eq 1)"/> <label value="@load(queueItem.description)"/> <label value="@load(queueItem.userQueueStatus)"/> <label value="@load(queueItem.startTime)"/> <label value="@load(queueItem.totalDuration)"/> </row> </template> </grid> </hbox> </window> </zk>

</zk>

I have 3 radio buttons; on clicking each one of them we get a grid with column headers of different size I want a fixed column height tried using css and other properties but didn't worked out for me. Can anyone help me out please Thanks in advance.

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More