Thread Rating:
  • 357 Vote(s) - 2.9 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ComboBoxのListを「右寄せ」にしたい
04-10-2014, 11:53 AM,
#3
Music  RE: ComboBoxのListを「右寄せ」にしたい
blackwoodさん

勉強になりました。
ありがとうございます。

できましたので
下記のようにまとめてみました。


{let modelBig GrinefaultListModel =
{DefaultListModel
"red", "green", "blue"
}
}

{def cbo-length = 100px}

{def cbo =
{ComboBox
width = cbo-length,
control-appearance-changeable? = true,
data-model = model,
list-item-creation-proc =
{proc {val:any}:ListItem
{return
{ListValueItem
val,
|| 選択肢の右寄せ設定
label = {VBox
halign="right",
width = cbo-length - 26px,
{value val}
}
}
}
}
}
}

|| 選択した値の右寄せ設定
{let ui:SkinnableComboBoxUI = cbo.ui-object asa SkinnableComboBoxUI}
{let g1:{Iterator-of Graphic} = ui.graphical-children}
{let g2:any = {g1.read-one-as-any}} || g2がFrame
{let g3:{Iterator-of Graphic} = g2.graphical-children}
{let g4:any = {g3.read-one-as-any}} || g4がGrid
{let g5:{Iterator-of Graphic} = g4.graphical-children}
{let g6:any = {g5.read-one-as-any}} || g6がSkinnableComboBoxTextField
{set g6.halign = "right"}

{Frame
color = "black",
cbo
}


Messages In This Thread
RE: ComboBoxのListを「右寄せ」にしたい - by e.kou - 04-10-2014, 11:53 AM
Forum Jump:


Users browsing this thread:
2 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('1066')