34 lines
922 B
Python
34 lines
922 B
Python
from typing import Any
|
|
|
|
import dearpygui.dearpygui as _dpg
|
|
|
|
import dpg_map as dpgm
|
|
|
|
dpg: Any = _dpg
|
|
|
|
|
|
def main() -> None:
|
|
dpg.create_context()
|
|
dpg.create_viewport(title="dpg-map table sizing", width=1000, height=600)
|
|
|
|
with (
|
|
dpg.window(label="Table Layout", width=-1, height=-1),
|
|
dpg.table(header_row=True, resizable=True, policy=dpg.mvTable_SizingStretchProp),
|
|
):
|
|
dpg.add_table_column(label="Map")
|
|
dpg.add_table_column(label="Controls")
|
|
with dpg.table_row():
|
|
with dpg.table_cell(), dpgm.map_widget(tag="map-table", width=-1, height=500):
|
|
dpgm.add_marker("table-marker", lat=51.5, lon=-0.1)
|
|
with dpg.table_cell():
|
|
dpg.add_text("Resize the window and table columns.")
|
|
|
|
dpg.setup_dearpygui()
|
|
dpg.show_viewport()
|
|
dpg.start_dearpygui()
|
|
dpg.destroy_context()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|