Hi Isomorphic,
I have problems with resizing of layout. INHO it should work this way, but it doesn't work. Am I missing something?
SmartClient Version: v12.0p_2019-12-04/PowerEdition Deployment (built 2019-12-04)
Best regards
Pavo
I have problems with resizing of layout. INHO it should work this way, but it doesn't work. Am I missing something?
SmartClient Version: v12.0p_2019-12-04/PowerEdition Deployment (built 2019-12-04)
Code:
package com.smartgwt.sample.client; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.core.KeyIdentifier; import com.smartgwt.client.types.Alignment; import com.smartgwt.client.types.Cursor; import com.smartgwt.client.util.Page; import com.smartgwt.client.util.PageKeyHandler; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.Img; import com.smartgwt.client.widgets.Label; import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.layout.VLayout; import com.smartgwt.client.widgets.layout.VStack; public class BuiltInDS extends VLayout implements EntryPoint { public void onModuleLoad() { KeyIdentifier debugKey = new KeyIdentifier(); debugKey.setCtrlKey(true); debugKey.setKeyName("D"); Page.registerKey(debugKey, new PageKeyHandler() { public void execute(String keyName) { SC.showConsole(); } }); setWidth100(); setHeight100(); VStack iconPlusLabel = new VStack(2) { { setHeight(72); setStyleName("menuButtonMouseNormal"); HLayout hL = new HLayout(0) { { Img img = new Img("http://127.0.0.1:8888/builtinds/sc/skins/Enterprise/images/DynamicForm/search_icon.svg", 48, 48); // Img img = new Img("http://127.0.0.1:8888/builtinds/sc/skins/Enterprise/images/DynamicForm/search_icon~2.png", 48, 48); img.setCursor(Cursor.HAND); setHeight(48); setWidth(190); setAlign(Alignment.CENTER); setMembers(img); } }; Label label = new Label("Label title") { { setHeight(20); setAlign(Alignment.CENTER); setCursor(Cursor.HAND); } }; setMembers(hL, label); } }; VLayout vL = new VLayout(); vL.setAlign(Alignment.CENTER); vL.setShowEdges(true); vL.setCanDragResize(true); vL.setHeight(300); vL.setWidth(300); vL.setMembers(iconPlusLabel); setMembers(vL); draw(); } }
Pavo
Comment