Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hello,
Is it possible to create a toggle bitmap button using only the .res file? I tried with the GetDDescription function its work well, but when I use .res file this doesn't work. Also, when I use the FORCE_SIZE on .res file I get an error.
.res
GetDDescription
FORCE_SIZE
BITMAPBUTTON BUTTON_ID { TOGGLE; BUTTON; FORCE_SIZE 16; ICONID1 5160; ICONID2 5159; }
Thanks
hi,
something like this will work as you expect (i hope) The trick is to create a two columns group and a dummy statictext so the button will have the "right" size.
GROUP { COLUMNS 2; BITMAPBUTTON BUTTON_ID { SIZE 32; TOGGLE; BUTTON; ICONID1 5160; ICONID2 5159; } STATICTEXT { DUMMY; } }
One side effect is the icon will not be centered. You can see on this thread why.
Cheers, Manuel
hi @m_magalhaes,
Thank you much, that works.
I have an another question concerning Description Resource, I don't know if I post it here or I must create a new post.
Description Resource
Here is the code:
GROUP { REAL MYOBJECT_PITCH { UNIT DEGREE; CUSTOMGUI REALSLIDER; MIN -360; MAX 360; STEP 1; } BITMAPBUTTON MYOBJECT_STRAIGHTEST_PITCH { SIZE 16; BUTTON; ALIGN_LEFT; ICONID1 5160; } REAL MYOBJECT_ROTATION { UNIT DEGREE; CUSTOMGUI REALSLIDER; MINSLIDER -90; MAXSLIDER 270; STEP 1; } STATICTEXT { JOINENDSCALE; } }
And here screenshot of what I want to do: Thanks
Group is the key in UI. Simply add a SCALE_H; property for your slider. so for that two columns group, the slider will take all the place minus the button.
SCALE_H;
GROUP { COLUMNS 2; REAL ONEFLOAT { CUSTOMGUI REALSLIDER; SCALE_H;} BITMAPBUTTON BUTTON_ID { SIZE 16; TOGGLE; BUTTON; ICONID1 5160; ICONID2 5159; } }